Skip to content

research: presentation changes must not orphan verified corrections - #77

Draft
safal207 wants to merge 2 commits into
research/r5p-paired-feedback-2026-09-05from
research/r5p-factual-lineage-2026-09-05
Draft

research: presentation changes must not orphan verified corrections#77
safal207 wants to merge 2 commits into
research/r5p-paired-feedback-2026-09-05from
research/r5p-factual-lineage-2026-09-05

Conversation

@safal207

@safal207 safal207 commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Stacked continuation of #76 — no merge or site deployment

Base pinned to 0d83d3e767756e40b5fceab4fe207a524c152ede. Current candidate: b068a5d18a90b7215c6dbc7d91aa2359078c035c. The #76 branch and main are unchanged.

Reproduced issue

A presentation-only a1 → a2 transition caused an otherwise bound accepted correction addressed to a1 to be ignored as stale. The exact same fixture worked when the answer was full from the start OR compact from the start. The failure was the presentation transition, not brevity.

Candidate repair

  • Separate answer_id from fact_revision; presentation and pending-review changes retain factual lineage.
  • Delayed evidence/outcomes may cross presentation changes only within that factual revision. Receipt binding remains to the event's original answer, plus all existing scope/time/claim checks.
  • Context or accepted-proof changes create a new barrier, including a return to an older context name or the same verdict.
  • Earlier outcomes remain explicitly attributed to the earlier answer and are displayed separately; current-answer success is not inferred.

Review follow-up

CodeRabbit's #76 review examined the reported lineage issue and additional validation concerns. The candidate disables checkout credential persistence; rejects invalid HTML output suffixes before writing; keeps all runtime checks in bridge/report/probe/exporter active under Python -O; excludes skipped/expected failures from passed counts; and uses POSIX fingerprint paths. Original 52 test methods are unchanged; 20 lineage and 8 validation methods were added. #76 review threads remain open because its branch has not been modified. This candidate still requires final review; automated code review is not independent scientific replication.

Actually observed

  • 80/80 tests passed, zero skips or expected failures, locally with Python 3.13.5 and in CI with Python 3.12.14. Both normal and optimized-Python runs passed; repeated runs are NOT extra independent tasks.
  • Existing 12 temporal cases and 8 prior demo endpoints retained (reused cases).
  • Pinned presentation/receipt-binding matrix: baseline 6/21, candidate 21/21. These are overlapping variants of ONE synthetic fixture, not independent tasks or model accuracy.
  • Local Chromium smoke at 1440/390: 3 table rows, source disclosure, layout, two JSON exports; no page errors or outbound requests. HTML bytes unchanged by review hardening. Not a deployed site or human study.
  • Exported 18 planned two-turn development episodes (6 open families × 3 arms × 1 repeat). Brief-only control retained; future-turn inputs and oracles separated. No model responses collected; model/parameters/whole-episode budget not yet frozen.

Exact-head CI evidence verified

Run: https://github.com/safal207/RESONANCE/actions/runs/33965487680
Head: b068a5d18a90b7215c6dbc7d91aa2359078c035c
Artifact: paired-feedback-dev-evidence, ID 9969278057, 91,654 bytes.
SHA-256: 8acce3bdfd7bda32bb5dee1919c3512009a0de85e664f47d8bd0d2330afe038c.
Downloaded ZIP integrity and digest checked. Every reported Python source hash matches local bytes. Normal/optimized CI summaries and audit/bridge/A-B-C JSON match each other; audit/bridge/plan match local results. This is repeatability in another environment, not independent research replication.

Reproduce

cd benchmarks/paired-feedback-v0.1
python verify.py --out results
git show 0d83d3e767756e40b5fceab4fe207a524c152ede:benchmarks/paired-feedback-v0.1/paired.py > /tmp/paired_before.py
python lineage_probe.py --baseline /tmp/paired_before.py --out results
python prepare_abc.py --out results/abc-smoke
python -O verify.py --out results-optimized

Open results/lineage-audit.html. See LINEAGE.md, REVIEW_FOLLOWUP.md, and the two Russian research notes under reports/science/paired-feedback-{lineage,validation-followup}-2026-09-05.ru.md.

Boundaries

0 comparative LLM runs; 0 participants. Token-saving, pressure reduction, scientific novelty, adoption and commercial efficacy are unmeasured. Receipt registry/state are a trusted local test boundary, not source authentication or action authority. The A/B/C export is not an inference adapter or preregistered efficacy experiment. Existing persisted states need regeneration; no migration implemented. No auto-merge or journal-site deployment.

Separate answer rendering identity from factual revision identity without relaxing exact receipt bindings. Keep earlier-answer outcomes visible but explicitly attributed to that earlier answer. Add 20 boundary test methods, a pinned before/after audit (21 overlapping perturbations), an offline HTML report and a provider-neutral A/B/C input exporter. Original 52 tests remain unchanged. No LLM runs, participants, token savings, deployment or efficacy claim. Stacked continuation of draft PR #76; do not merge automatically.
@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

safal207 commented Sep 5, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

Please review candidate 6380a8324b53e8b721386660fa80421028cbf85c against pinned #76 head 0d83d3e767756e40b5fceab4fe207a524c152ede. Focus on whether fact_revision safely permits corrections addressed to an earlier presentation without crossing context/evaluated-proof barriers, and whether related_outcome_observations preserves original-answer attribution. Also check the baseline fingerprint gate, CI reproduction and A/B/C export boundaries. Original 52 tests are unchanged. No merge requested; automated review is not an independent human study or scientific replication.

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='0d83d3e767756e40b5fceab4fe207a524c152ede'
head='6380a8324b53e8b721386660fa80421028cbf85c'

echo '== Commit availability and metadata =='
git cat-file -e "${base}^{commit}"
git cat-file -e "${head}^{commit}"
git show -s --format='BASE%n%H%n%P%n%s%n%nHEAD%n%H%n%P%n%s' "$base" "$head"

echo '== Changed paths =='
git diff --name-status "$base" "$head"

echo '== Diff summary =='
git diff --stat "$base" "$head"

echo '== Relevant filename discovery =='
fd -HI -t f '^(paired|lineage_probe|prepare_abc|verify|LINEAGE)\.(py|md)$|^(.*\.(yml|yaml))$' . \
  | sed -n '1,240p'

echo '== Python structural outlines =='
while IFS= read -r f; do
  echo "--- $f"
  ast-grep outline "$f" --items all --type function,class 2>/dev/null || true
done < <(git diff --name-only "$base" "$head" -- '*.py')

echo '== Workflow structural outlines =='
while IFS= read -r f; do
  echo "--- $f"
  sed -n '1,280p' "$f"
done < <(git diff --name-only "$base" "$head" -- '.github/workflows/*.yml' '.github/workflows/*.yaml')

echo '== Targeted diff: lineage implementation, tests, CI, and documentation =='
git diff --find-renames --find-copies --unified=80 "$base" "$head" -- \
  'benchmarks/paired-feedback-v0.1/*.py' \
  '.github/workflows/*.yml' '.github/workflows/*.yaml' \
  'benchmarks/paired-feedback-v0.1/*.md' \
  'reports/science/paired-feedback-lineage-2026-09-05.ru.md' \
  | sed -n '1,2200p'

echo '== Static references to lineage and experimental-boundary terms =='
rg -n -i -C 3 \
  'fact_revision|related_outcome_observations|answer_id|fingerprint|baseline|lineage_probe|prepare_abc|comparative|participants|preregister|inference adapter|efficacy|deployment|auto-merge' \
  benchmarks .github reports 2>/dev/null \
  | sed -n '1,2600p'

Length of output: 7709


🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='0d83d3e767756e40b5fceab4fe207a524c152ede'
head='6380a8324b53e8b721386660fa80421028cbf85c'

echo '== Candidate Python outlines =='
for f in \
  benchmarks/paired-feedback-v0.1/paired.py \
  benchmarks/paired-feedback-v0.1/verify.py \
  benchmarks/paired-feedback-v0.1/test_lineage.py \
  benchmarks/paired-feedback-v0.1/lineage_probe.py \
  benchmarks/paired-feedback-v0.1/prepare_abc.py
do
  echo "--- $f"
  ast-grep outline "$f" --items all --type function,class 2>/dev/null || true
done

echo '== Candidate implementation: paired.py =='
cat -n benchmarks/paired-feedback-v0.1/paired.py

echo '== Baseline implementation: paired.py =='
git show "${base}:benchmarks/paired-feedback-v0.1/paired.py" | cat -n

echo '== Candidate tests: test_lineage.py =='
cat -n benchmarks/paired-feedback-v0.1/test_lineage.py

echo '== Candidate verifier and workflow =='
cat -n benchmarks/paired-feedback-v0.1/verify.py
cat -n .github/workflows/paired-feedback.yml

echo '== Candidate lineage probe and A/B/C generator =='
cat -n benchmarks/paired-feedback-v0.1/lineage_probe.py
cat -n benchmarks/paired-feedback-v0.1/prepare_abc.py

echo '== Candidate boundaries documentation =='
cat -n benchmarks/paired-feedback-v0.1/LINEAGE.md
cat -n reports/science/paired-feedback-lineage-2026-09-05.ru.md

echo '== Exact candidate diff =='
git diff --find-renames --unified=120 "$base" "$head" -- \
  .github/workflows/paired-feedback.yml \
  benchmarks/paired-feedback-v0.1/paired.py \
  benchmarks/paired-feedback-v0.1/verify.py \
  benchmarks/paired-feedback-v0.1/test_lineage.py \
  benchmarks/paired-feedback-v0.1/lineage_probe.py \
  benchmarks/paired-feedback-v0.1/prepare_abc.py \
  benchmarks/paired-feedback-v0.1/LINEAGE.md \
  reports/science/paired-feedback-lineage-2026-09-05.ru.md

echo '== All direct calls to relevant APIs =='
rg -n -C 4 \
  '\b(build_answer|apply|accept|receipt|outcome|fact_revision|related_outcome_observations|answer_id)\s*\(' \
  benchmarks/paired-feedback-v0.1 \
  -g '*.py'

Length of output: 155483


🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='0d83d3e767756e40b5fceab4fe207a524c152ede'
head='6380a8324b53e8b721386660fa80421028cbf85c'
repo='safal207/RESONANCE'

echo '== Immutable source fingerprints =='
printf 'baseline paired.py SHA-256: '
git show "${base}:benchmarks/paired-feedback-v0.1/paired.py" | sha256sum
printf 'candidate paired.py SHA-256: '
git show "${head}:benchmarks/paired-feedback-v0.1/paired.py" | sha256sum
echo 'Declared baseline fingerprint:'
rg -n '^BASELINE_SHA256|^BASELINE_COMMIT' benchmarks/paired-feedback-v0.1/lineage_probe.py

echo '== Candidate ancestry and exact changed source identity =='
git merge-base --is-ancestor "$base" "$head" && echo 'baseline is an ancestor of candidate'
git diff --quiet "$base" "${head}^" && echo 'candidate parent equals baseline'
git diff --name-only "${head}^" "$head" -- benchmarks/paired-feedback-v0.1/paired.py

echo '== Pull request metadata =='
gh pr view 77 --repo "$repo" --json number,state,isDraft,headRefName,headRefOid,baseRefName,baseRefOid,url

echo '== Paired-feedback workflow runs for this pull request =='
gh run list --repo "$repo" --workflow paired-feedback.yml --branch "$(gh pr view 77 --repo "$repo" --json headRefName --jq .headRefName)" --limit 10 \
  --json databaseId,headSha,event,status,conclusion,workflowName,url,createdAt,updatedAt

echo '== Generated artifact and ignore-rule checks =='
git ls-tree -r --name-only "$head" | rg -n '(^|/)(results|abc-smoke|lineage-audit)\b|operator-key\.json|assessor-oracle\.json|fingerprints\.json' || true
fd -HI -t f '^\.gitignore$' . -x sh -c 'echo "--- $1"; cat -n "$1"' sh {} \;

Length of output: 3202


@safal207 Reviewed candidate 6380a8324b53e8b721386660fa80421028cbf85c against pinned baseline 0d83d3e767756e40b5fceab4fe207a524c152ede.

I found no blocking issues.

  • fact_revision permits delayed evidence and outcomes across presentation-only and pending-review revisions.
  • Context changes and accepted-proof revisions create new factual barriers.
  • _receipt() still requires the receipt to bind to the event’s original answer_id. It also retains context, claim, scope, availability, and query-time checks.
  • related_outcome_observations preserves the original answer_id. outcome_observations remains limited to the current answer. The current answer is not marked successful from related history.
  • The baseline SHA-256 gate matches the exact paired.py content at the pinned baseline commit.
  • The candidate is a direct child of the pinned baseline.
  • Workflow run 33965140273 completed successfully on the exact requested candidate head.
  • prepare_abc.py exports only NOT_RUN synthetic development packets. The manifest and documentation state the model, parameters, and budget gate. They also state that the export is not an execution adapter, human study, or efficacy result.

The review did not treat the deterministic fixture comparison as an independent human study or scientific replication.

⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Keep verification active under optimized Python; preserve distinct HTML/JSON output paths; exclude skipped/expected failures from pass counts; normalize fingerprint paths; disable checkout credential persistence. Add eight regression tests and normal/optimized CI runs. Original 52 tests and the pinned baseline are unchanged. 80/80 local tests passed in both interpreter modes; these are repeated developer checks, not model or human efficacy evidence.

safal207 commented Sep 5, 2026

Copy link
Copy Markdown
Owner Author

Follow-up: validation must survive interpreter optimization

New exact head: b068a5d18a90b7215c6dbc7d91aa2359078c035c (fast-forward of this stacked draft only; #76 and main unchanged).

Verified the seven #76 review findings against local source. Factual-lineage handling was addressed in the first candidate. This follow-up disables checkout credential persistence, rejects non-HTML output paths before writing, uses unconditional validation in the bridge/report/new probe/exporter, records skipped/expected-failure counts separately, and normalizes fingerprint paths. Added eight regression methods: 80/80 local tests, with zero skips/expected failures, passed both normally and under python -O. The original 52 tests were not edited. The 12 reused temporal cases, 8 prior demo endpoints, 6/21 → 21/21 presentation matrix and the unrun 18-episode A/B/C plan remain unchanged; these are overlapping/repeated checks, not independent studies.

The previous candidate 6380a8... was successfully reproduced in Actions run 33965140273. I downloaded artifact 9969172806, verified SHA-256 7d8c675500dda1e0fa23f61baa796d607beb28a99c6885d8c27a16433aaef3b0, ZIP integrity, source hashes and JSON equality with local results. That success belongs to the previous head, not this new head. New CI now also runs all validators under -O.

@coderabbitai review
Please review the updated exact head, including source/receipt boundaries and the new validation guards. No merge requested. Automated review is not independent scientific replication, and comparative LLM runs/human participants remain zero.

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

base='0d83d3e767756e40b5fceab4fe207a524c152ede'
previous='6380a8324b53e8b721386660fa80421028cbf85c'
head='b068a5d18a90b7215c6dbc7d91aa2359078c035c'
repo='safal207/RESONANCE'

echo '== Commit identity and ancestry =='
git cat-file -e "${base}^{commit}"
git cat-file -e "${previous}^{commit}"
git cat-file -e "${head}^{commit}"
git show -s --format='%H%nparents: %P%nsubject: %s' "$base" "$previous" "$head"
git merge-base --is-ancestor "$base" "$head" && echo 'baseline is ancestor of updated head'
git merge-base --is-ancestor "$previous" "$head" && echo 'previous candidate is ancestor of updated head'

echo '== Changed paths: previous candidate to updated head =='
git diff --name-status "$previous" "$head"
echo '== Changed paths: pinned baseline to updated head =='
git diff --name-status "$base" "$head"

echo '== Diff from previous candidate =='
git diff --find-renames --find-copies --unified=100 "$previous" "$head" -- \
  .github/workflows \
  benchmarks/paired-feedback-v0.1 \
  reports/science \
  | sed -n '1,3200p'

echo '== Python and workflow outlines for changed files =='
git diff --name-only "$previous" "$head" -- '*.py' '*.yml' '*.yaml' '*.md' \
  | while IFS= read -r f; do
      echo "--- $f"
      case "$f" in
        *.py) ast-grep outline "$f" --items all --type function,class 2>/dev/null || true ;;
        *) cat -n "$f" | sed -n '1,900p' ;;
      esac
    done

echo '== Target implementations and tests =='
for f in \
  benchmarks/paired-feedback-v0.1/paired.py \
  benchmarks/paired-feedback-v0.1/verify.py \
  benchmarks/paired-feedback-v0.1/lineage_probe.py \
  benchmarks/paired-feedback-v0.1/prepare_abc.py \
  benchmarks/paired-feedback-v0.1/test_lineage.py \
  .github/workflows/paired-feedback.yml
do
  if test -f "$f"; then
    echo "--- $f"
    cat -n "$f" | sed -n '1,1800p'
  fi
done

echo '== Validation mechanisms and write sites =='
rg -n -i -C 5 \
  '\bassert\b|raise\s+(ValueError|RuntimeError|SystemExit)|html|write_text|open\s*\(|Path\s*\(|BASELINE_SHA256|BASELINE_COMMIT|fingerprint|persist-credentials|python\s+-O|unittest|expectedFailure|skip' \
  benchmarks/paired-feedback-v0.1 .github/workflows \
  -g '*.py' -g '*.yml' -g '*.yaml'

echo '== Pull request and workflow-run metadata =='
gh pr view 77 --repo "$repo" --json number,state,isDraft,headRefOid,baseRefOid,headRefName,url
gh run list --repo "$repo" --commit "$head" --limit 20 \
  --json databaseId,headSha,event,status,conclusion,workflowName,url,createdAt,updatedAt

Length of output: 195171


@safal207 Reviewed updated head b068a5d18a90b7215c6dbc7d91aa2359078c035c against pinned base 0d83d3e767756e40b5fceab4fe207a524c152ede.

I found no blocking issues.

  • The updated head is a direct continuation of the prior candidate. PR #77 is still a draft against the pinned base.
  • _receipt() still requires the receipt answer_id to match the event’s original bound answer. It also retains factual-revision, context, claim, scope, availability, and query-time checks.
  • A presentation-only revision retains fact_revision. A context revision or accepted proof revision creates a new factual barrier.
  • related_outcome_observations includes only prior answers in the current factual revision. Each record retains its original answer_id. outcome_observations remains limited to the current answer.
  • build_demo.build() rejects a non-HTML output path before it creates directories or writes files.
  • The bridge, verifier, lineage probe, and A/B/C exporter now use explicit exceptions for runtime validation. Their checks do not depend on Python assert.
  • The regression test scans these runtime validator modules for ast.Assert.
  • verify.test_counts() excludes skipped and expected-failure methods from unit_tests_passed and reports both counts separately.
  • Fingerprint map keys use POSIX paths.
  • The workflow disables persisted checkout credentials and runs verify.py, lineage_probe.py, and prepare_abc.py with python -O.
  • GitHub Actions run 33965487680 completed successfully for this exact head.
  • The A/B/C export remains a NOT_RUN synthetic development packet. It contains no model run, credentials, responses, participants, or efficacy result.

This review treats the deterministic checks as code validation. It does not treat them as independent scientific replication or as evidence from comparative LLM runs or human participants.

You are interacting with an AI system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant