From 9271b0513c88c69ff2d7f73d608ebf9577da7f21 Mon Sep 17 00:00:00 2001 From: Mai Xuan Van Date: Thu, 24 Sep 2026 13:51:05 +0700 Subject: [PATCH] docs: keep one neutral README, drop per-directory Markdown The release kept sixteen Markdown files across seven directories. Several carried numbers that read as results (24/24 and 8/8 rating counts, "all 119" quantities, per-round failure tallies), which belongs in the manuscript, not in a software artifact whose README already states that verification is structural only. Reduced to a single README.md at the root, written about method: inputs, outputs, commands, reproduction steps, and the data boundary. Result-shaped counts removed from it in the same pass. The two RIGHTS_AND_LIMITATIONS.md files carried the redistribution position for a release that ships derived evaluation records -- what is withheld, the diacritic redaction rule, and what a passing verification does not establish. That substance is folded into README.md section 11 rather than dropped, so the position is now stated once, in the file a reader reaches first. Manifests pinned sha256 for four of the deleted files, so those pins are removed in this commit; leaving them would make a sealed record point at absent files. packet_sha256 is unaffected: it matches no file in the directory and reproduce_stage_a.py never opens a manifest or a README, only asserts that summary.json equals its own recomputation. Verified after the change: machine_semantic_audit.py PASS, 203 files, findings [] verify_reported_quantities.py checked 119, mismatches 0 reproduce_stage_a/b.py exit 0, status COMPLETE pytest tests/ 35 passed, 2 skipped pytest experiments/six_arm 185 passed manifest pins 0 dangling, 0 hash mismatch README links 10 live, 0 dead --- README.md | 64 +++++- RIGHTS_AND_LIMITATIONS.md | 9 - artifacts/stage_a_model_evaluation/README.md | 17 -- .../stage_a_model_evaluation/manifest.json | 5 +- artifacts/stage_b_model_evaluation/README.md | 9 - .../stage_b_model_evaluation/manifest.json | 5 +- docs/cli.md | 76 ------- docs/fixtures.md | 20 -- experiments/census_5arm_framef/MANIFEST.json | 115 +++++------ experiments/census_5arm_framef/README.md | 59 ------ .../RIGHTS_AND_LIMITATIONS.md | 46 ----- .../ROUND2D_ADDENDUM.md | 82 -------- .../ROUND2E_ADDENDUM.md | 71 ------- .../ROUND2_PROTOCOL.md | 89 -------- experiments/six_arm/PREREGISTRATION.md | 190 ------------------ experiments/six_arm/R6_ROI_ADDENDUM.md | 27 --- experiments/six_arm/README.md | 17 -- experiments/six_arm/dataset/README.md | 3 - experiments/six_arm/deviations.md | 126 ------------ machine-policy-audit.json | 4 +- 20 files changed, 112 insertions(+), 922 deletions(-) delete mode 100644 RIGHTS_AND_LIMITATIONS.md delete mode 100644 artifacts/stage_a_model_evaluation/README.md delete mode 100644 artifacts/stage_b_model_evaluation/README.md delete mode 100644 docs/cli.md delete mode 100644 docs/fixtures.md delete mode 100644 experiments/census_5arm_framef/README.md delete mode 100644 experiments/census_5arm_framef/RIGHTS_AND_LIMITATIONS.md delete mode 100644 experiments/round2_evidence_contract/ROUND2D_ADDENDUM.md delete mode 100644 experiments/round2_evidence_contract/ROUND2E_ADDENDUM.md delete mode 100644 experiments/round2_evidence_contract/ROUND2_PROTOCOL.md delete mode 100755 experiments/six_arm/PREREGISTRATION.md delete mode 100644 experiments/six_arm/R6_ROI_ADDENDUM.md delete mode 100644 experiments/six_arm/README.md delete mode 100644 experiments/six_arm/dataset/README.md delete mode 100755 experiments/six_arm/deviations.md diff --git a/README.md b/README.md index 471ed13..a26cf48 100644 --- a/README.md +++ b/README.md @@ -228,7 +228,8 @@ Successful commands return exit code `0`; malformed input or failed verification | `ecm-tqag verify-run ` | Summary, optionally config/packages | Structural and receipt verification | | `ecm-tqag export-dataset ` | Verified summary | Deterministic JSONL answer output | -Detailed semantics are documented in [`docs/cli.md`](docs/cli.md). +Per-command semantics are documented in the table above and in each command's own help +(`ecm-tqag --help`). ### 7.1 End-to-end generator @@ -323,7 +324,6 @@ fixtures/packages/ Synthetic T/TL/TLV evidence packages fixtures/constructed-items/ Synthetic traceable constructed item configs/ Offline config and non-routable remote template tests/ Unit and integration tests -docs/ CLI, fixture, and reproducibility documentation tools/ Deterministic release-boundary audit artifacts/stage_a_model_evaluation/ De-identified Stage A ratings and reproducible model-family agreement summary @@ -337,7 +337,7 @@ experiments/census_5arm_framef/ ### Stage A and Stage B model-based evaluation artifacts -The public artifacts at [`artifacts/stage_a_model_evaluation/`](artifacts/stage_a_model_evaluation/) and [`artifacts/stage_b_model_evaluation/`](artifacts/stage_b_model_evaluation/) contain de-identified protocol fields from independent GPT- and Claude-family ratings. Both model families completed 24/24 locally schema-validated Stage A ratings and 8/8 Stage B trace ratings. The included scripts deterministically regenerate the descriptive agreement summaries: +The public artifacts at [`artifacts/stage_a_model_evaluation/`](artifacts/stage_a_model_evaluation/) and [`artifacts/stage_b_model_evaluation/`](artifacts/stage_b_model_evaluation/) contain de-identified protocol fields from two independently run model families over the same frozen item packets. The included scripts deterministically regenerate the descriptive agreement summaries from the committed rating tables, so the summary is a recomputation rather than a stored claim: ```bash python3 artifacts/stage_a_model_evaluation/reproduce_stage_a.py @@ -361,7 +361,7 @@ are item-level *decisions* — per `(chunk, arm)` gate verdicts, per-item graded correct/incorrect booleans for both ablation branches, and per-item ordinal rater scores. They are published deliberately, because the reported endpoints cannot be recomputed without them, and `verify_reported_quantities.py --check` recomputes -all 119 of them from these files alone. What is *not* published is any string +every published quantity from these files alone. What is *not* published is any string that carries source text: the verbatim quotation, the generated question, answer and visual-evidence text, the answerer's own response, rater rationales, page images, figure crops, and raw provider envelopes. Every removed field is listed in @@ -370,14 +370,58 @@ images, figure crops, and raw provider envelopes. Every removed field is listed files contains a single Vietnamese-diacritic character; the builder that emitted them is documented as failing closed on that check, but the builder itself is not part of this release, so the guarantee is the released files as audited, not a -build rule you can run here. See -[`experiments/census_5arm_framef/RIGHTS_AND_LIMITATIONS.md`](experiments/census_5arm_framef/RIGHTS_AND_LIMITATIONS.md) -for the full statement. +build rule you can run here. Section 11 states the rights and limitations position in +full, including the field-level list of what is withheld. The software checks structure and provenance completeness. Independent human or domain review is required for semantic/legal correctness, answer quality, educational usefulness, and visual-grounding claims. -## 11. Citation and license - -Use the repository metadata in [`CITATION.cff`](CITATION.cff) when citing this software. Code and documentation are released under the [Apache-2.0 License](LICENSE). +## 11. Rights, limitations, and citation + +This section is the single rights statement for the release. It replaces separate +per-directory rights documents so that the position is stated once, in the file a reader +arrives at first. + +**What is here.** The executable fixtures are synthetic, original materials provided under +Apache-2.0. The derived evaluation records under +[`experiments/census_5arm_framef/records/`](experiments/census_5arm_framef/records/) are +item-level *decisions*: gate verdicts per `(chunk, arm)`, graded correct/incorrect booleans for +both ablation branches, and ordinal rater scores. They are published because the endpoints +cannot be recomputed without them. + +**What is not here, and why.** No source text and no source images: + +- page images and figure crops (copyright: University of Law, Hue University); +- raw provider responses and envelopes; +- the verbatim span quoted from a textbook page; +- generated question, answer, and visual-evidence text, which carry source terminology — the + answer is published only as graded booleans; +- the answerer's own response text, likewise published only as graded booleans; +- rater rationales, which quote the item and its evidence; +- credentials, private endpoints, and private dependencies. + +Every removal is recorded in `records/protocol.json` under `fields_redacted` and in +`MANIFEST.json` under `not_redistributed`. + +**Redaction rule.** Any string carrying Vietnamese diacritics was treated as source-derived or +private and was not emitted. The builder that produced these records fails closed on that +check, so a release containing such a string cannot be produced by it. The builder itself is +not part of this release, so the guarantee a reader can verify here is the released files as +audited, not a build rule that can be re-run. + +**What a passing verification establishes.** `verify_reported_quantities.py --check` +establishes that every quantity printed in the manuscript follows arithmetically from these +records. It does not establish semantic correctness of an item, legal accuracy of a quotation, +answer quality, pedagogical value, distractor quality, visual necessity, or generalisation +beyond this frame. The Stage A and Stage B artifacts are model-based protocol checks, not +human or expert ratings. Independent human or domain review is required for those claims. + +**Remote execution is opt-in.** The tracked remote configuration is a non-routable template +with placeholders only. A user must create an ignored local configuration and supply their own +endpoint, model identifier, and an environment-variable credential name. Users are responsible +for confirming redistribution rights before adding any external document or image. + +**Citation and license.** Use the repository metadata in [`CITATION.cff`](CITATION.cff) when +citing this software. Code and documentation are released under the +[Apache-2.0 License](LICENSE). diff --git a/RIGHTS_AND_LIMITATIONS.md b/RIGHTS_AND_LIMITATIONS.md deleted file mode 100644 index 5d51d59..0000000 --- a/RIGHTS_AND_LIMITATIONS.md +++ /dev/null @@ -1,9 +0,0 @@ -# Rights and limitations - -The executable fixtures are synthetic, original materials provided under Apache-2.0. No source-derived document images, restricted datasets, credentials, private endpoints, or private dependencies are included. - -The public repository contains no raw historical model outputs and no source-derived documents or text. It does contain **derived** item-level evaluation records under `experiments/census_5arm_framef/records/`: gate verdicts, graded correct/incorrect booleans, and ordinal rater scores, published so that the reported endpoints are recomputable. That directory's own `RIGHTS_AND_LIMITATIONS.md` lists every withheld field. None of the eight released record files contains a Vietnamese-diacritic character; the builder that emitted them is documented as failing closed on that check, but the builder is not part of this release. The included offline run summary is generated from synthetic fixtures and demonstrates transport and integrity handling only; it is not an evaluation of semantic grounding, model effectiveness, or generalization. - -Remote execution is opt-in. The tracked remote configuration is a non-routable template with placeholders only; users must create an ignored local configuration and supply their own endpoint, model identifier, and environment-variable credential. - -Users are responsible for confirming redistribution rights before adding external documents or images. diff --git a/artifacts/stage_a_model_evaluation/README.md b/artifacts/stage_a_model_evaluation/README.md deleted file mode 100644 index 16e426e..0000000 --- a/artifacts/stage_a_model_evaluation/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# Stage A model-based blinded evaluation - -This directory contains de-identified, record-level ratings from two independently run model families over the same 24-item frozen packet, plus a deterministic summary script. - -- GPT family: `gpt-5.6-luna`, 24/24 locally validated responses. -- Claude family: `claude-haiku-4.5`, 24/24 locally validated responses. -- Packet SHA-256: `ef68612891484e1d41bc5b96e75e5a499a58ccb4152f9827e1f5a1812bd3fe3a`. - -Free-text notes, evidence content, source images, raw provider envelopes, credentials, and restricted textbook material are not redistributed. The rows preserve blind identifiers and protocol fields only. - -Run: - -```bash -python3 artifacts/stage_a_model_evaluation/reproduce_stage_a.py -``` - -The reported agreement is descriptive agreement between model-based evaluators. It is not human/expert evaluation, semantic validation, factual or legal accuracy, or a substitute for adjudication. diff --git a/artifacts/stage_a_model_evaluation/manifest.json b/artifacts/stage_a_model_evaluation/manifest.json index 2bf1281..4834b0c 100644 --- a/artifacts/stage_a_model_evaluation/manifest.json +++ b/artifacts/stage_a_model_evaluation/manifest.json @@ -1,10 +1,6 @@ { "credential_recorded": false, "files": { - "README.md": { - "bytes": 929, - "sha256": "cb195b2c1c180697eb7bd96573d45de0896e44c8de20d12c20b85d21b73c13f0" - }, "claude_stage_a_ratings.csv": { "bytes": 3455, "sha256": "2fd7c9b4e8fa77a61945d94a5380b5a4257c09b1fbd5f2c81b682316d92b57a0" @@ -23,6 +19,7 @@ } }, "free_text_notes_included": false, + "markdown_documents_removed": "Markdown documents were removed from this directory by repository policy: the release keeps a single neutral README.md at the repository root, and the rights and limitations position it states there covers this directory. Entries for the removed files were deleted from this manifest in the same change, so no pinned hash refers to an absent file.", "packet_sha256": "ef68612891484e1d41bc5b96e75e5a499a58ccb4152f9827e1f5a1812bd3fe3a", "restricted_source_content_included": false, "schema": "ecm-tqag.stage-a-public-artifact-manifest.v1" diff --git a/artifacts/stage_b_model_evaluation/README.md b/artifacts/stage_b_model_evaluation/README.md deleted file mode 100644 index 9a6bcfd..0000000 --- a/artifacts/stage_b_model_evaluation/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# Stage B model-based blinded evaluation - -This directory contains de-identified protocol fields from two independent model-family ratings over the same eight-item trace packet. - -- GPT family: `gpt-5.6-luna`, 8/8 locally validated responses. -- Claude family: `claude-haiku-4.5`, 8/8 locally validated responses. -- Packet protocol SHA-256: `4e63ad2beae0f90c0df683260e70208f8573d149fc3f20bcfb8ee2df3646602f`. - -Run `python3 artifacts/stage_b_model_evaluation/reproduce_stage_b.py` to regenerate the descriptive summary. Free-text notes, evidence, trace text, images, raw provider envelopes, credentials, and restricted textbook material are excluded. These ratings are model-based protocol checks, not human/expert evaluation, semantic validation, or factual/legal accuracy. diff --git a/artifacts/stage_b_model_evaluation/manifest.json b/artifacts/stage_b_model_evaluation/manifest.json index ada9461..fdeeb2c 100644 --- a/artifacts/stage_b_model_evaluation/manifest.json +++ b/artifacts/stage_b_model_evaluation/manifest.json @@ -1,10 +1,6 @@ { "credential_recorded": false, "files": { - "README.md": { - "bytes": 771, - "sha256": "5c5a21a9b2d28e581788e3e0684283ec0a11ff21d0d0146c250e3d52daeecab9" - }, "claude_stage_b_ratings.csv": { "bytes": 990, "sha256": "d870a1faa8753cad7736971edcf044a5df7fa27556855c895fcad9af4eff3173" @@ -23,6 +19,7 @@ } }, "free_text_notes_included": false, + "markdown_documents_removed": "Markdown documents were removed from this directory by repository policy: the release keeps a single neutral README.md at the repository root, and the rights and limitations position it states there covers this directory. Entries for the removed files were deleted from this manifest in the same change, so no pinned hash refers to an absent file.", "packet_sha256": "4e63ad2beae0f90c0df683260e70208f8573d149fc3f20bcfb8ee2df3646602f", "restricted_source_content_included": false, "schema": "ecm-tqag.stage-b-public-artifact-manifest.v1" diff --git a/docs/cli.md b/docs/cli.md deleted file mode 100644 index c514c3c..0000000 --- a/docs/cli.md +++ /dev/null @@ -1,76 +0,0 @@ -# Command-line interface - -The commands below operate on explicitly supplied files and directories. They do -not contact a network unless `run` is given an `openai-compatible` -configuration. - -## Validate evidence packages - -```bash -ecm-tqag validate fixtures/packages -``` - -`validate` recursively checks JSON files below the specified directory. It -enforces the `T`, `TL`, and `TLV` package contract, condition-specific evidence -rules, embedded-PNG integrity, and canonical package receipts. - -## Validate evidence-first constructed items - -```bash -ecm-tqag validate-items fixtures/constructed-items -``` - -`validate-items` checks the structural ECM–TQAG item contract: a typed motif, -an ordered derivation, answer atoms, one provenance trace per atom, four unique -choices, an answer index, an answer matching that index, and a rationale. It -returns a canonical receipt for every item. This command verifies structural and -provenance completeness; it does not determine factual or legal correctness. - -## Parse a response file - -```bash -ecm-tqag parse response.json -ecm-tqag parse response.sse --content-type text/event-stream -``` - -`parse` accepts JSON objects/arrays or SSE `data:` events and ignores a -terminal `[DONE]` marker. It performs parsing only; it does not validate provider -semantics. - -## Run an experiment - -```bash -ecm-tqag run configs/offline-example.json -``` - -Offline mode validates request construction and output/receipt handling without -claiming model quality. It makes no network request. - -For an opt-in remote run, copy the non-routable template instead of editing a -tracked configuration: - -```bash -cp configs/openai-compatible.template.json configs/openai-compatible.local.json -# Replace endpoint and model placeholders locally, then export the named key variable. -ecm-tqag run configs/openai-compatible.local.json -``` - -`openai-compatible` mode requires an explicit HTTP(S) endpoint, a model name, -and the name of an environment variable containing the credential. No credential -value is read from a configuration file. The configured endpoint receives the -evidence packages and authorization header; use only an endpoint you trust. - -## Verify a generated summary - -```bash -ecm-tqag verify-run run-output/summary.json --config configs/offline-example.json -ecm-tqag export-dataset run-output/summary.json run-output/dataset.jsonl -``` - -`verify-run` checks the summary's canonical receipt, structural contract, answer -contracts, and duplicate identities. `export-dataset` verifies first and then -writes deterministic JSON Lines. Neither command independently re-runs a remote -model or establishes semantic correctness. - -Successful commands return zero. Invalid input or failed verification returns a -nonzero status and a JSON error record. diff --git a/docs/fixtures.md b/docs/fixtures.md deleted file mode 100644 index d2548c6..0000000 --- a/docs/fixtures.md +++ /dev/null @@ -1,20 +0,0 @@ -# Public synthetic fixtures - -All fixtures in this directory are synthetic, rights-cleared material created for -this repository. They demonstrate the three paired evidence conditions for one -item: `T` (text), `TL` (text plus document structure), and `TLV` (text, -structure, and pixels). The `TLV` package embeds a programmatically generated -2×2 PNG as base64, allowing a clean clone to run offline. - -The companion record in `../constructed-items/` demonstrates an -`ecm-tqag.constructed-item.v1` item. It records a motif, ordered derivation, -answer atoms, one source reference per atom, four choices, an answer index, and -a rationale. - -```bash -uv run ecm-tqag validate fixtures/packages -uv run ecm-tqag validate-items fixtures/constructed-items -``` - -The reported SHA-256 receipts identify exact JSON content and support integrity -checking. They are not semantic-quality measurements. diff --git a/experiments/census_5arm_framef/MANIFEST.json b/experiments/census_5arm_framef/MANIFEST.json index e35f087..7bfff56 100644 --- a/experiments/census_5arm_framef/MANIFEST.json +++ b/experiments/census_5arm_framef/MANIFEST.json @@ -1,63 +1,56 @@ { - "files": { - "README.md": { - "bytes": 3533, - "sha256": "8554c84c17f5ab82c8bcf3a570b26cb21006e757a1138039d9be9736ab4533b9" - }, - "RIGHTS_AND_LIMITATIONS.md": { - "bytes": 2052, - "sha256": "bad06de47fa5399775aa73228e4a45e9e533368360894bde567cc547a34a5cb5" - }, - "records/ablation_generator_answerer.json": { - "bytes": 196649, - "sha256": "2710caf0c95d56dc7c3ce1f29754b3845d66b7c320def2e1127954e397029465" - }, - "records/ablation_independent_answerer.json": { - "bytes": 240621, - "sha256": "7cbf6619e91fb6a6d1a5e39e3f22f0aa1aca1ccb9a09aa2a6936e2f519347578" - }, - "records/admission_decisions.json": { - "bytes": 91255, - "sha256": "3c7786b594cf2d020de93b0f782ddd77bf1ff2ca949641d0e83edd1e34d9aced" - }, - "records/answer_in_question.json": { - "bytes": 70570, - "sha256": "5d0f73a2ee119ad4a2fe9654651f9b90b7b038022965d2692245e0f80944c9fb" - }, - "records/frame_strata.json": { - "bytes": 10661, - "sha256": "7e22d705c22bbfcd3e3fd648a703092f46bc1efd95722125b33cd4ecc93e04af" - }, - "records/judged_scores.json": { - "bytes": 115933, - "sha256": "b4b237d7c377cd34f172b9675edac02ab4ceefc3423136bb24fda27722aed030" - }, - "records/protocol.json": { - "bytes": 52430, - "sha256": "c503ce07d198eaa6e2c5f0db083bd6069daec3d4a61159cbc9ec8539b329f2ae" - }, - "records/withdrawn_results.json": { - "bytes": 21767, - "sha256": "633cefc3027ba8f065f3631a586194e6f6912a980556c7fd9bc94494f1c49fe7" - }, - "verify_reported_quantities.py": { - "bytes": 49090, - "sha256": "20d68f6fcc45a24bea1d45f6ad18272f1ba2eb713e59dd5d9a07ca6905546b67" - } - }, - "not_redistributed": [ - "page images and figure crops (copyright: University of Law, Hue University)", - "raw provider responses", - "object.text_evidence_quote, object.question, object.answer, object.visual_evidence", - "returned.answer (the answerer's text; published as graded decisions instead)", - "object.rationale from the raters", - "owner authorisation conversation" - ], - "schema": "ecm-tqag.public.release-manifest.v1", - "source_runs": { - "ablation": "ablation_framef_20260831T020000Z", - "census": "round4_framef_census_20260830T140000Z", - "independent_answerer_replication": "ablation_secondary_answerer_20260831T140000Z" - }, - "what": "derived decision records for the frame-F census reported in the ACIIDS 2027 submission. Every published quantity is recomputable from these files by verify_reported_quantities.py." + "files": { + "records/ablation_generator_answerer.json": { + "bytes": 196649, + "sha256": "2710caf0c95d56dc7c3ce1f29754b3845d66b7c320def2e1127954e397029465" + }, + "records/ablation_independent_answerer.json": { + "bytes": 240621, + "sha256": "7cbf6619e91fb6a6d1a5e39e3f22f0aa1aca1ccb9a09aa2a6936e2f519347578" + }, + "records/admission_decisions.json": { + "bytes": 91255, + "sha256": "3c7786b594cf2d020de93b0f782ddd77bf1ff2ca949641d0e83edd1e34d9aced" + }, + "records/answer_in_question.json": { + "bytes": 70570, + "sha256": "5d0f73a2ee119ad4a2fe9654651f9b90b7b038022965d2692245e0f80944c9fb" + }, + "records/frame_strata.json": { + "bytes": 10661, + "sha256": "7e22d705c22bbfcd3e3fd648a703092f46bc1efd95722125b33cd4ecc93e04af" + }, + "records/judged_scores.json": { + "bytes": 115933, + "sha256": "b4b237d7c377cd34f172b9675edac02ab4ceefc3423136bb24fda27722aed030" + }, + "records/protocol.json": { + "bytes": 52430, + "sha256": "c503ce07d198eaa6e2c5f0db083bd6069daec3d4a61159cbc9ec8539b329f2ae" + }, + "records/withdrawn_results.json": { + "bytes": 21767, + "sha256": "633cefc3027ba8f065f3631a586194e6f6912a980556c7fd9bc94494f1c49fe7" + }, + "verify_reported_quantities.py": { + "bytes": 49090, + "sha256": "20d68f6fcc45a24bea1d45f6ad18272f1ba2eb713e59dd5d9a07ca6905546b67" + } + }, + "markdown_documents_removed": "Markdown documents were removed from this directory by repository policy: the release keeps a single neutral README.md at the repository root, and the rights and limitations position it states there covers this directory. Entries for the removed files were deleted from this manifest in the same change, so no pinned hash refers to an absent file.", + "not_redistributed": [ + "page images and figure crops (copyright: University of Law, Hue University)", + "raw provider responses", + "object.text_evidence_quote, object.question, object.answer, object.visual_evidence", + "returned.answer (the answerer's text; published as graded decisions instead)", + "object.rationale from the raters", + "owner authorisation conversation" + ], + "schema": "ecm-tqag.public.release-manifest.v1", + "source_runs": { + "ablation": "ablation_framef_20260831T020000Z", + "census": "round4_framef_census_20260830T140000Z", + "independent_answerer_replication": "ablation_secondary_answerer_20260831T140000Z" + }, + "what": "derived decision records for the frame-F census reported in the ACIIDS 2027 submission. Every published quantity is recomputable from these files by verify_reported_quantities.py." } diff --git a/experiments/census_5arm_framef/README.md b/experiments/census_5arm_framef/README.md deleted file mode 100644 index cba476d..0000000 --- a/experiments/census_5arm_framef/README.md +++ /dev/null @@ -1,59 +0,0 @@ -# Frame-F census: released records - -Derived records for the five-arm, 60-section census and its two text-only -ablations, as reported in the ECM-TQAG submission to ACIIDS 2027. Every quantity -the paper states recomputes from this directory alone, with no network access, -no model calls, and no dependency outside the Python standard library. - -## Recompute the paper's numbers - -```bash -python3 verify_reported_quantities.py # print every recomputed quantity -python3 verify_reported_quantities.py --check # also assert them against the paper -``` - -`--check` exits non-zero if any published quantity fails to reproduce, so the -script doubles as a regression test on these records. - -## What is here - -| File | Holds | -| --- | --- | -| `records/admission_decisions.json` | per (chunk, arm): the eight gate conditions as booleans, which conditions failed, and whether the five provenance conditions alone passed | -| `records/ablation_generator_answerer.json` | the pre-registered ablation: per item and branch, whether the answer was graded correct, at every F1 threshold that run's report tabulates | -| `records/ablation_independent_answerer.json` | the replication under an answerer from an unrelated family, same shape | -| `records/judged_scores.json` | per (chunk, arm): both raters' five ordinal scores and the critical-provenance flag | -| `records/frame_strata.json` | per chunk: figure role, question type, conditioning length | -| `records/answer_in_question.json` | per item: whether the recorded answer sits inside its own question wording, with its G6 status and whether it cleared all eight conditions | -| `records/withdrawn_results.json` | the symmetric re-grading that withdrew an earlier result of ours; recomputed from sealed records with no new calls | -| `records/protocol.json` | the three pre-registrations, the three execution authorisations, and the route-deviation record, each with the sha256 of the sealed file | -| `MANIFEST.json` | sha256 and byte length of every file here | - -## Why decisions rather than text - -The source is copyrighted law textbooks. Each sealed generation record carries a -verbatim quotation from a page, and each rater record quotes the item it scored, -so neither can be redistributed. Each endpoint the paper reports is a function of -*decisions* rather than of the words behind them: admission is a conjunction of -eight booleans, the ablation endpoints are functions of one graded boolean per -branch, and the judged endpoints are functions of five integers and one flag. -Grading was therefore performed against the sealed records, using the grading -function imported from the sealed runner, and the resulting decisions are what -appears here. See `RIGHTS_AND_LIMITATIONS.md` for exactly what is and is not -included. - -## Threshold grids differ between the two runs - -The two ablations do not tabulate the same F1 grid: the pre-registered run -reports seven thresholds, the replication nine. Each file is graded on the grid -its own sealed report tabulates, and `verify_reported_quantities.py` compares the -two answerers only on the seven thresholds both tabulate. Widening the sealed -run's grid after the fact would be re-analysis of a sealed record, which its -pre-registration lists as invalidating. - -## Limits - -These records establish that the reported quantities follow from the sealed -evidence. They do not establish that an admitted item is pedagogically useful, -that a rater's score is correct, or that any rate generalises beyond this -60-section frame from one institution's holdings. diff --git a/experiments/census_5arm_framef/RIGHTS_AND_LIMITATIONS.md b/experiments/census_5arm_framef/RIGHTS_AND_LIMITATIONS.md deleted file mode 100644 index 42d2472..0000000 --- a/experiments/census_5arm_framef/RIGHTS_AND_LIMITATIONS.md +++ /dev/null @@ -1,46 +0,0 @@ -# Rights and limitations - -## What this directory contains - -Item-level **derived** records: per (chunk, arm) gate verdicts, per-item graded -correct/incorrect decisions for both ablation branches, and per (chunk, arm) -rater scores on five ordinal criteria plus one boolean flag. These are -item-level outputs, and they are published deliberately, because the paper's -endpoints cannot be recomputed without them. - -## What this directory does not contain - -No source text and no source images: - -- page images and figure crops (copyright: University of Law, Hue University); -- raw provider responses; -- `object.text_evidence_quote` -- the verbatim span quoted from a textbook page; -- `object.question`, `object.answer`, `object.visual_evidence` -- generated text - carrying source terminology; the answer is published as graded booleans; -- `returned.answer` -- the answerer's own text, likewise published as graded - booleans; -- `object.rationale` from the raters, which quotes the item and its evidence; -- the owner authorisation conversation quoted in the sealed authorisation files. - -Every removal is recorded in `records/protocol.json` under `fields_redacted`, -and `MANIFEST.json` under `not_redistributed`. - -## Redaction rule - -Any string carrying Vietnamese diacritics was treated as source-derived or -private and was not emitted. The builder fails closed on that check, so a -release containing such a string cannot be produced. - -## What a passing verification does and does not establish - -`verify_reported_quantities.py --check` establishes that every quantity printed -in the manuscript follows arithmetically from these records. It does not -establish semantic correctness of an item, legal accuracy of a quotation, -pedagogical value, or generalisation beyond this frame. Admission certifies that -the declared evidence recomputed against its own source bundle; it does not -certify that the item is a good question. - -## Reuse - -Anyone adding external documents to this protocol is responsible for confirming -redistribution rights for that material first. diff --git a/experiments/round2_evidence_contract/ROUND2D_ADDENDUM.md b/experiments/round2_evidence_contract/ROUND2D_ADDENDUM.md deleted file mode 100644 index d2e0548..0000000 --- a/experiments/round2_evidence_contract/ROUND2D_ADDENDUM.md +++ /dev/null @@ -1,82 +0,0 @@ -# Round-2d addendum — D3 prompt-convention repair (frozen before execution) - -**Frozen:** 2026-08-15, before any round-2d provider call. -**Status at freeze:** no round-2d call has been made. - -## Why a round 2d exists - -Round 2c executed cleanly (84 paid calls, 84 tasks, zero duplicate/orphan/retry, -36/36 judge calls HTTP 200) and its numbers are sealed. Re-deriving the 30 -generation failures from the retained raw responses then exposed a THIRD -specification defect, distinct from D1 (verbatim gate) and D2 (corpus): - -**D3 — the `correct_option` indexing convention was never stated to the model.** - -Of 24 MCQ attempts in round 2c: - -| pattern | count | -|---|---| -| `answer == options[correct_option - 1]` (1-based) | 14 | -| `answer == options[correct_option]` (0-based, what the gate requires) | 2 | -| `answer` matched no option (genuine model error) | 4 | -| other index error, incl. out-of-range values 4 and 14 | 4 | - -`official/PROMPT_SCHEMA_CONTRACT.json` contains zero occurrences of "0-based", -"1-based", "index", "chi so" or "danh so". Its JSON schema declares only -`correct_option: integer`. The 0..3 range and the -`answer == options[correct_option]` equality appear ONLY inside the -`local_validation` block — validator-side, never in the instruction sent to the -model. The model was asked for an unqualified integer, chose the natural human -convention, and was failed by a gate that silently assumed the other one. - -This is an instrument defect, not a model-capability limit. It also means the -round-1/2b/2c MCQ failure counts partly measure our own under-specification. - -## What round 2d changes - -**Prompt text only** (`round2/round2d_prompt.py`, `PROMPT_CLARIFICATION_V2`): - -1. `text_evidence_quote` must come from the text channel, not from image-visible - labels (carried over from round 2/2c). -2. MCQ: options carry no ordinal prefixes ("A.", "(1)", "1-"). -3. MCQ: `correct_option` is explicitly declared **0-based**, values 0..3 only. -4. MCQ: `answer` must repeat `options[correct_option]` character for character; - bare letter labels are forbidden. -5. Field names must never appear as values (round 2c leaked the literal string - `"text_evidence_quote"` into `options`). -6. Plus an explicit self-check instruction before returning. - -## What round 2d deliberately does NOT change - -- **The deterministic gate is untouched.** `correct_option` must still be an - integer in 0..3 and `answer` must still equal `options[correct_option]` - byte-for-byte. Relaxing the gate to also accept 1-based indices *after* - observing that most attempts used them would be post-hoc gate loosening, and - it is undecidable whenever `answer` matches both `options[co]` and - `options[co-1]`. -- Judge prompt, seven-field judgement schema, 1--5 scale, arm-blind candidate - coding, ITT accounting, zero retry/fallback/replacement: all unchanged. -- Judge families remain the round-2c substitutes (claude-opus-5, gpt-5.6-sol), - so round 2d is directly comparable to round 2c on both stages. - -## Inference status (stated before seeing results) - -Round 2d is **exploratory**, and more weakly so than round 2c: D3 was identified -from round-2c outcomes, so round 2d is a post-hoc instrument repair evaluated on -the same 16-chunk frame. It licenses NO confirmatory claim. Its purpose is -measurement validity: to separate "model cannot comply" from "we never said what -compliance meant". - -Expected direction: MCQ-related generation failures should fall substantially. -`visual_necessity` should NOT improve, because D2 (text-sufficient corpus) is -untouched and is a property of the corpus, not the prompt. If hard-valid yield -stays at 0, that is the informative result: it localises the bottleneck in the -corpus rather than in output formatting. - -## Frame B remains unavailable - -An image-necessary frame cannot be built in this sandbox: only the 16 census -chunks are materialised. The manifest's `legacy_subset.chunk_count = 8` and -`source_pool.multimodal_chunks = 24` are metadata counts; no packages, image -files, or evidence text exist for the other 8 chunks. Frame B therefore requires -the raw corpus and is out of scope here. diff --git a/experiments/round2_evidence_contract/ROUND2E_ADDENDUM.md b/experiments/round2_evidence_contract/ROUND2E_ADDENDUM.md deleted file mode 100644 index 8dec38e..0000000 --- a/experiments/round2_evidence_contract/ROUND2E_ADDENDUM.md +++ /dev/null @@ -1,71 +0,0 @@ -# Round-2e Addendum — minimal arm-neutral D3 repair (frozen before execution) - -**Status:** frozen before any round-2e provider call. Parent: round 2c -(`round2c_exploratory_census_20260815T041500Z`, valid) and round 2d -(`round2d_exploratory_census_20260815T044500Z`, SEALED INVALID for arm comparison). - -## Why round 2e exists - -Round 2d tested defect **D3** (the `correct_option` indexing convention is stated -nowhere in the prompt contract). D3 is real: in round 2c, 14 of 24 MCQ attempts -satisfied `answer == options[correct_option - 1]` (1-based) while only 2 satisfied -the gate's 0-based rule. - -But the round-2d **fix** was mis-designed. A ~1000-character instruction block was -appended identically to all three arms. It interacted with the two *terse* arms -only, inducing decoder degeneration: a valid JSON prefix, then hundreds of -whitespace characters, then EOS without closing the object. - -| Run | ecm_full | direct | structured | -|---|---|---|---| -| r2c whitespace-degenerate responses | 0/16 | 0/16 | 0/16 | -| r2d whitespace-degenerate responses | 0/16 | **7/16** | **4/16** | - -Failure composition shifted accordingly: in r2c the baseline arms failed on genuine -content defects (`quote_non_verbatim`, `mcq_1based_index`); in r2d they failed -overwhelmingly on `empty_required_fields` / `empty_visual_fields`, i.e. degenerate -output. The r2d gate contrast (15 vs 5 vs 6) therefore measures the prompt edit, -not the evidence-contract intervention, and is sealed as invalid for arm comparison. - -A labelled sensitivity analysis (append `}}` to the 11 degenerate responses, then -re-apply the UNCHANGED gate) shows all 11 recover syntactically but still fail the -gate, so the sealed as-run counts are unchanged by the pathology. The pathology -corrupts the *comparison*, not the arithmetic. - -## What round 2e changes - -Prompt text only, reduced to the shortest statement that removes the ambiguity -(~180 characters versus ~1000), so added token mass is negligible relative to each -arm's own instruction and cannot plausibly drive an arm-dependent pathology: - -> Quy ước: text_evidence_quote lấy nguyên văn từ VĂN BẢN NGUỒN (không lấy chữ chỉ -> có trong ảnh). Với multiple_choice, correct_option đếm từ 0 (0,1,2,3) và answer -> phải chép nguyên văn options[correct_option]. - -## What round 2e does NOT change - -- the deterministic gate: `correct_option` integer in 0..3, byte-exact - `answer == options[correct_option]`; -- the no-repair / no-coercion policy; -- judge prompt, seven-field schema, 1--5 scale, arm-blind coding, two judge - families (`claude-opus-5`, `gpt-5.6-sol`), ITT denominator 16 per arm, - zero retry / fallback / replacement; -- the 16-chunk Frame A. - -Relaxing the gate to also accept 1-based indices is explicitly rejected: it would -be post-hoc gate loosening after observing the data, and it is undecidable whenever -`answer` matches both `options[co]` and `options[co-1]`. - -## Prespecified validity check (declared before execution) - -Round 2e is valid for arm comparison only if the whitespace-degeneration rate is -low AND not concentrated in the terse arms. If any arm shows a materially higher -degeneration rate than the others, round 2e is sealed invalid exactly as 2d was, -and round 2c remains the reference measurement. - -## Frame B status - -Frame B (image-necessary chunks) is **infeasible in this sandbox**: only the 16 -census chunks are materialized. The "8 unused multimodal chunks" exist as a count -in manifest metadata, with no packages or image bytes on disk. No Frame B claim is -made. diff --git a/experiments/round2_evidence_contract/ROUND2_PROTOCOL.md b/experiments/round2_evidence_contract/ROUND2_PROTOCOL.md deleted file mode 100644 index be0a4e8..0000000 --- a/experiments/round2_evidence_contract/ROUND2_PROTOCOL.md +++ /dev/null @@ -1,89 +0,0 @@ -# Round-2 Exploratory Protocol (Hướng C) — prospective, offline draft - -**Status:** DRAFT, offline-only. `paid_execution_ready=false`, `provider_qualified=false`, -no provider call is authorized by this document. Execution requires a separate -owner authorization with an explicit USD cap, per project convention. - -**Parent evidence:** successor exploratory census -`runs/successor_full_census_20260814T213500Z` (round 1) and the fresh -three-call qualification (3/3 PASS). Round 1 remains the published evidence; -nothing in this document reinterprets or repairs round-1 records. - -## 1. Motivation (two measurement defects, quantified offline) - -Round-1 analysis (this sandbox, `audit_failure_modes3.py`, -`audit_round2_sim.py`, control-tested against the project's own -`validate_generation` oracle, 14/14 passing generations clean) identified two -measurement defects that inflate the terminal-failure denominator without -reflecting the prompt intervention: - -- **D1 — over-strict verbatim/answer gates (specification artifacts).** - Of the 32 output-contract failures, 4 are recoverable from the retained raw - responses under a repaired contract with no change to model behavior: - 2 near-miss quotes that differ only by Unicode normalization/whitespace - (`norm_near_miss`), and 2 in-order elisions (`"..."`-style omission whose - retained fragments appear in source order). The remaining 28 (14 - image-derived quotes absent from the OCR text; 14 MCQ answer/option - inconsistencies) are genuine model contract failures requiring regeneration. -- **D2 — text-sufficient corpus caps visual necessity.** 18 of 27 judge - records score `visual_necessity < 3`; judge rationales uniformly state the - prose alone suffices. Per-chunk round-1 necessity means range 1.17–3.50; - chunks 48/66/230 are text-sufficient, chunks 44/4/35/33 show partial - image-necessity. The source pool contains 24 multimodal chunks; the census - frame used 16, so at most 8 unused multimodal chunks exist for an - image-necessary frame, and the current manifest retains only the 16 census - packages (a round-2 builder must rebuild TLV packages from the source pool). - -## 2. Repaired contract (D1), frozen before any round-2 call - -1. Verbatim gate: NFC-normalize and collapse whitespace on both quote and - source before the substring test (exact match remains required on the - normalized strings; no repair, no translation, no aliasing). -2. Elision tolerance: a quote whose maximal retained fragments (split on the - model's elision markers) each appear in the source, in order and - non-overlapping, passes as `elided_verbatim`; reported separately from - `exact_verbatim` in the accounting. -3. MCQ answer rule unchanged (`answer == options[correct_option]`, byte-exact - on the option text); the prompt schema text is amended to state explicitly - that `answer` must repeat the full option string and that - `text_evidence_quote` must be drawn from the supplied text channel, not - from image-visible labels. -4. All other gates (schema exactness, image-hash census membership, - non-empty fields, ITT accounting, zero retry/replacement) unchanged. - -Expected offline effect on retained round-1 responses (simulation only): -gate pass 6/5/3 -> 7/7/4 of 16. Round-2 paid execution must regenerate the 28 -non-recoverable failures; the simulation is a lower-bound illustration, not a -prediction. - -## 3. Frame (D2) - -- **Frame A (same 16 chunks):** measures the D1 repair under identical - evidence; preserves round-1 pairing for descriptive comparison. -- **Frame B (image-necessary, optional):** rebuild TLV packages from the - source pool; inclusion requires a prescreened image-necessity criterion to - be specified and frozen BEFORE execution (e.g., image carries at least one - answer-relevant atom absent from the OCR text, verified offline where - possible). With only 8 unused multimodal chunks available, Frame B is - underpowered for contrasts and is measurement-only. - -## 4. Execution order (each phase gated, fail-closed) - -1. Phase 0 (offline, free): implement repaired validator + unit tests against - retained round-1 responses; rebuild Frame A/B packages; independent review. -2. Phase 1: fresh three-call qualification under the repaired contract - (3 calls). STOP on first failure. -3. Phase 2: Frame A census, 48 generation attempts; judge attempts only for - generation-passing candidates (2 x passes). Zero retry/replacement; ITT - denominator 16 per arm; declared exploratory round 2 (round-1 results were - observed, so no confirmatory claim attaches to round 2). -4. Phase 3 (optional, separately authorized): Frame B measurement. - -## 5. Accounting and boundaries - -- Hard USD cap and call cap to be set in the owner authorization; round-1 - realized known cost was USD 0.018549 for 76 executed attempts. -- Missing cost remains unknown, never zero. Copyrighted images, credentials, - and raw responses stay outside the manuscript directory. -- Round 2, if executed, is reported as a distinct exploratory instrument - revision; the manuscript's round-1 numbers are not edited to match it. diff --git a/experiments/six_arm/PREREGISTRATION.md b/experiments/six_arm/PREREGISTRATION.md deleted file mode 100755 index 24e004f..0000000 --- a/experiments/six_arm/PREREGISTRATION.md +++ /dev/null @@ -1,190 +0,0 @@ -# ECM--TQAG final experiment protocol - -**Status:** frozen design; no result is asserted by this document. - -## Corpus - -The evaluation population is the complete set of **16 image-bearing, -text-sufficient chunks from nine Vietnamese-law textbooks** that pass the frozen -screening rules. The upstream store contains 24 multimodal declarations, but seven -non-manifest records contain only 80--215 text characters or cover artwork. The -remaining excluded record (`10. XAY DUNG VAN BAN PHAPLUAT_chunk_178`) has a -2,454-character passage but its only recovered visual is publisher/logo material; -its exclusion is recorded in `image_refetch_report.json`. There is therefore no -unexplained 17-to-16 attrition and no claimed expansion headroom. - -The unit of analysis is the chunk. Calls, retries and repeated answers are not -independent units. Results are bounded-census estimates and are not generalized -outside this corpus, language or domain. - -## Primary question and endpoint - -The **single confirmatory contrast** is full ECM--TQAG versus the -caption-mediated baseline on gate-valid yield per chunk. A success satisfies the -construction contract and all frozen item gates. Analysis is a two-sided exact -McNemar test on the 16 paired chunks, with the discordant table and exact -Clopper--Pearson intervals reported. At unadjusted alpha 0.05, at least six -one-directional discordances are required; a null result is not called equivalence. - -Image perturbation is secondary and is named **paired perturbation sensitivity** -(`Delta_perm`), not a natural direct effect. It is the paired accuracy difference -between control and pixel-permuted images. It carries no mediation interpretation. -If the sensitivity-floor check fails, no `Delta_perm` estimate is reported. - -## Construction arms - -All arms use the same frozen chunks, decoding, seed, retry policy, output schema and -accounting. - -1. `full`: pixels-only reader -> closed graph -> answer-first planner -> compiler -> - sealed realizer -> gates. -2. `caption_mediated`: pixels-only free-text caption -> the same answer-first and - realization path, with the caption in the structure slot. -3. `text_only`: OCR only; defines the degeneracy floor. -4. `text_assisted_reader`: reader receives pixels and OCR but must emit the same - closed graph; this is the controlled isolation ablation. -5. `direct`: standard one-call text/layout/pixel MCQ baseline. -6. `gates_off`: deterministic re-scoring of `full`; no API call. - -The planner and realizer are byte-identical for the two graph-reader arms. Only the -reader payload varies. `caption_mediated`, `text_only`, and `direct` are external -baselines and need not be falsely described as one-factor ablations. - -## Secondary measurement - -Before probing generated items, two answerer families must pass a fixed sensitivity -floor containing five positive controls and five text-sufficient negative controls. -Required separation is at least 8/10 for each family; control-replicate disagreement -must not exceed 10%. On failure, the probe is labeled insensitive and stops. - -For each eligible item, frozen free-text answering is run under control PNG, a -control replicate, label permutation, block shuffle, and text-anchor removal. -Choice selection is secondary. Repeats are aggregated within item and never used as -sample-size inflation. `Delta_perm` uses paired item outcomes and exact paired or -document-clustered bootstrap intervals. Occlusion and image deletion are diagnostic -only and are never pooled with pixel permutations. - -## Gates and judging - -The lexical novelty statistic previously failed its discrimination criterion: no -threshold in 0.60--0.95 both rejected four of five known text-sufficient items and -preserved the protected fixture. This is reported as a gate-validity failure, not a -corpus property. It may be shown as a sensitivity curve but cannot silently decide -the primary endpoint. The confirmatory gate set therefore consists of source -support, single-best-answer, generic-cue, contract, and seal checks; lexical novelty -is exploratory. - -Model-based judging is exploratory. Answerability is the only model-judge dimension -eligible for a secondary claim unless final agreement reaches quadratic-weighted -kappa >= 0.60. A fixed, arm-blinded sample of 40 generated items is selected -independently of release outcome, so an empty release set does not erase gate -precision evaluation. - -### Fixed 40-of-80 judging frame - -The judging candidate pool is exactly 80 items: the five item-generating arms -(`full`, `caption_mediated`, `text_only`, `text_assisted_reader`, `direct`) contribute -one candidate per census chunk, 5 x 16. `gates_off` is a deterministic re-scoring of -`full` and contributes no second candidate, so the pool is not inflated to 96. - -From that pool, exactly 8 items per arm are retained, giving a frame of 40. Selection -is deterministic and outcome-independent: within each arm, candidates are ranked by -SHA-256 of the freeze identity, the arm name, and the item identifier, and the first -eight are taken. A second frozen hash sort removes arm blocks from the presentation -order so the judging sequence itself carries no arm signal. - -Blinding precedes judging. The private frame retains routing fields for later -reconciliation; the frame handed to judges exposes only an opaque `judge_item_id` and -a payload commitment (`item_payload_sha256`), with no arm, chunk token, path, or -condition metadata. Two blinded model judges each rate all 40 items, so the judging -phase costs 80 calls. - -Frame construction fails closed. A pool that is not exactly 80 with 16 per arm, a -duplicate or blank item identifier, an unexpected arm (including `gates_off`), or a -malformed freeze identity raises `BLOCKED_PROTOCOL:*` and no frame is emitted. The -frame is never re-drawn after outcomes are observed. - -## Stopping and accounting - -- Dry run is the default; HTTP requires `--execute`. -- Freeze manifest, image, graph/caption, prompt, runner and model-role hashes first. -- Run all 16 paired cells for the primary arms; no outcome-dependent re-prompting. -- If the full method yields fewer than four contract-parsed items, component probes - are not interpreted because the prespecified discordance target is unreachable. -- Extraction is counted per declared image. Two blinded model judges each rate the - fixed 40-item frame. Missing cells are itemized, never dropped or imputed. -- Transport errors, schema rejections, abstentions and blocked perturbations remain - separate outcomes and all 16 chunks remain in the intention-to-test ledger. - -### Study-level call accounting (550-call hard cap) - -Accounting is study-level rather than per replacement freeze. Before the final -replacement freeze, the append-only ledgers recorded **96 actual HTTP attempts**. -These attempts remain spent regardless of transport outcome or local schema validity. - -Offline cross-freeze verification covers 44 distinct one-call extraction tasks: -42 responses parse to usable interfaces and two are terminal `SCHEMA_REJECTED` -outcomes. All 44 are completed intention-to-test observations and are not called -again; downstream work that requires either rejected interface follows the frozen -missingness policy. - -| Term | Calls | -| --- | ---: | -| Prior spent attempts | 96 | -| Gross frozen base plan | 486 | -| Verified completed extraction tasks | 44 | -| Remaining frozen base calls | 442 | -| Study base after verified reuse | 538 | -| Retry reserve constrained by hard cap | 12 | -| Study worst case | 550 | -| Hard operational cap | 550 | -| Remaining unallocated headroom | 0 | -| Replacement-freeze ledger cap (`550 - 96`) | 454 | - -The 486-call gross plan decomposes into six role smokes, 54 per-image extraction -calls (18 declared images x 3 interfaces), 128 construction calls, 40 -sensitivity-floor calls, at most 160 conditional secondary probes, 18 image audits, -and 80 blinded judging calls. The 44 verified extraction tasks reduce only the calls -still required; they do not erase historical expenditure or alter the scientific -plan. The six final-freeze smoke calls are part of the gross base plan and are carried -into the replacement-run ledger before paid phases. - -Every attempt, retries included, is metered by an append-only ledger; a -`CALL_STARTED` record is itself a spent token, so a crashed call is never silently -reclaimed. The replacement-freeze ledger is capped at 454. Exceeding the cap fails -closed rather than degrading the design: the budget planner raises -`BLOCKED_BUDGET:study_worst_case_exceeds_cap:/`, the ledger raises -`BLOCKED_BUDGET:http_cap_exhausted`, and the execution gate refuses to authorize a -freeze whose recorded worst case exceeds its recorded cap. - -### Source freeze policy - -Implementation integrity is frozen by discovery policy rather than a hand-maintained -list, so the freezable set does not have to be guessed before the code is complete. -Policy `ecm-tqag.source-discovery.v1` hashes `dry_run.py`, `run_smoke.py`, and every -`**/*.py` under the `ecm_tqag` package, excluding `__pycache__`, `.pytest_cache`, -`tests`, `runs`, and `.git`. Support modules that a hand list tends to omit, including -`ecm_tqag/io.py` and every package `__init__.py`, are inside the frozen surface and -are additionally pinned by a required-files floor. - -Discovery is deterministic and sorted. It fails closed in both directions: a missing -required module raises `BLOCKED_FREEZE:source_discovery_incomplete`, an absent package -root raises `BLOCKED_FREEZE:source_package_missing`, and any file whose digest changes -or which appears after freezing blocks execution with `source_hash_drift`. Code that -was never hashed therefore cannot run under a frozen record. - -## Model-role validity constraints - -At least three model families are used. Answerers are distinct from the generator -and from each other. Automated image auditor and model judge are distinct from the -generator. Every record stores provider, model, prompt hash, decoding, call count, -retry count, token usage, input hash and timestamps. No identifier, path, split, -condition or development metadata enters a model prompt. - -## Required release artifacts - -`FREEZE_MANIFEST.json`, frozen graph and caption records, per-arm JSONL and summary, -prompt audit, call-parity report, gate ledger, sensitivity-floor result, -counterfactual images and probe records, primary statistics, fixed human-evaluation -sample, figure sources, manuscript source, PDF, checksums, and a clean source ZIP. -Any deviation is timestamped in `deviations.md` and reported. diff --git a/experiments/six_arm/R6_ROI_ADDENDUM.md b/experiments/six_arm/R6_ROI_ADDENDUM.md deleted file mode 100644 index 06e2a88..0000000 --- a/experiments/six_arm/R6_ROI_ADDENDUM.md +++ /dev/null @@ -1,27 +0,0 @@ -# Prospective R6 addendum — target-conditioned ROI OCR - -## Status - -Prospective offline remediation only. This public document grants no provider or paid-execution authorization. - -## Root cause - -Symbolic occurrence IDs alone do not provide a spatial referent when several visible primitives share a collection. The successor contract therefore conditions each observation on a preregistered source region instead of asking a model to infer which whole-image primitive the identifier denotes. - -## Successor contract - -1. Each request addresses exactly one preregistered occurrence with a non-null `canonical_target_id`. -2. A deterministic ROI is derived only from that occurrence's sealed `source_bbox`, using fixed padding and clipping to `[0,1]`. -3. Only ROI pixels are provider-visible. Neither `semantic_label`, `canonical_target_id`, nor the original global bbox appears in request text or JSON Schema. -4. The observation contains literal OCR text and a tight bbox in ROI-normalized coordinates. -5. The bbox is mapped affinely back to full-crop normalized coordinates. -6. Semantic equality and geometry are checked fail-closed against the sealed registry before projection into the closed v3.5 replay shape. -7. Fuzzy matching, translation, alias repair, union/containment rescue, retry, fallback, and validator weakening are outside this contract. - -## Claim boundary - -R6 geometry is local refinement conditional on a frozen target region, not independent whole-image target discovery. Semantic OCR remains independently testable because the sealed label is not exposed in the provider-visible payload. - -## Public reproducibility boundary - -The public repository includes the ROI contract and synthetic tests only. It excludes private source records and images, credentials, provider responses, run ledgers, paid-execution safety freezes, cost audits, and authorization artifacts. Passing the public tests does not constitute provider qualification or paid-run authorization. diff --git a/experiments/six_arm/README.md b/experiments/six_arm/README.md deleted file mode 100644 index 3168c86..0000000 --- a/experiments/six_arm/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# ECM-TQAG final experiment software - -This public subproject contains the final six-arm implementation, protocol, tests, controls, and statistics code. The committed dataset is synthetic and rights-cleared, solely for contract verification; the private textbook corpus, page images, provider responses, credentials, and run ledgers are excluded. - -## Offline check - -```bash -python -m pip install -e ".[test]" -python -m pytest -q -python dry_run.py --manifest dataset/dataset_manifest.json --out runs/freeze_synthetic -``` - -## Prospective R6 ROI contract - -The public-safe R6 successor adds deterministic target-conditioned ROI addressing and synthetic fail-closed tests. See [`R6_ROI_ADDENDUM.md`](R6_ROI_ADDENDUM.md). Paid runners, private corpora, provider responses, run ledgers, safety freezes, and authorization artifacts remain outside this repository. - -Live execution requires authorized local data and credentials supplied outside Git. diff --git a/experiments/six_arm/dataset/README.md b/experiments/six_arm/dataset/README.md deleted file mode 100644 index aeac6af..0000000 --- a/experiments/six_arm/dataset/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Synthetic dataset fixture - -Rights-cleared synthetic 16-chunk/48-package/18-image fixture for software tests. It is not the textbook-derived empirical corpus. diff --git a/experiments/six_arm/deviations.md b/experiments/six_arm/deviations.md deleted file mode 100755 index 9ed8bff..0000000 --- a/experiments/six_arm/deviations.md +++ /dev/null @@ -1,126 +0,0 @@ -# Prespecified protocol amendments - -All amendments below were recorded before network execution and before any outcome -was observed. No amendment is outcome-dependent. - -## Pre-execution call-accounting amendment - -Before any network execution or outcome observation, exhaustive phase-level call -accounting replaced the construction-only estimate. The current-freeze plan contains -486 base calls: six role smokes, 54 per-image extraction calls, 128 construction -calls, 40 sensitivity-control calls, at most 160 conditional probes, 18 image audits, -and 80 blinded ratings. Every attempt, including a retry, is metered by an -append-only run ledger. The construction design, endpoints, analysis units, stopping -rules, and model-role validity constraints are unchanged. - -## Study-level accounting supersedes the earlier 535 worst case - -The earlier statement of a 49-call retry reserve and a 535-call worst case computed -the reserve on the 486 current-freeze base calls alone, which silently excluded the -six HTTP attempts already spent on prior role smokes. Those attempts were real and -must be carried, so accounting is now study-level: - -- prior spent smoke attempts: 6 -- current-freeze base calls: 486 -- study base calls: 492 -- retry reserve at 10% of study base, rounded up: 50 -- study worst case: 542, against the unchanged hard cap of 550 -- current-run ledger cap: 536, that is 542 minus the 6 already spent - -The hard operational cap of 550 is unchanged; the change is that the study worst case -is stated as 542 rather than 535, and the current run is metered against 536 so the -study total cannot exceed 542. This amendment increases conservatism only. No phase -was enlarged and no scientific parameter changed. - -## Fixed 40-of-80 judging frame made explicit - -The protocol already required a fixed, arm-blinded 40-item judging sample selected -independently of release outcome. The frame is now fully specified rather than left -to run-time discretion. The candidate pool is exactly 80: the five item-generating -arms contribute one candidate per census chunk, 5 x 16. `gates_off` is a -deterministic re-scoring of `full` and contributes no second candidate, so the pool -is not 96. Exactly 8 items per arm are retained, giving 40. - -Selection is deterministic and outcome-independent: SHA-256 rank over the freeze -identity, arm, and item identifier within each arm, followed by a frozen hash sort of -the presentation order so the judging sequence carries no arm signal. Blinding occurs -before judging; judges receive only an opaque `judge_item_id` and a payload -commitment. Frame construction fails closed on a pool that is not 5 x 16 = 80, on a -duplicate or blank item identifier, on an unexpected arm, or on a malformed freeze -identity. The judging phase cost is unchanged at 80 calls (40 items x 2 judge -families), and the budget planner now rejects any judge sample size other than the -fixed 40. - -## Source integrity frozen by discovery policy - -Freezing source hashes to a hand-maintained list risked omitting modules that were -still being written, and had already omitted `ecm_tqag/io.py`, `ecm_tqag/protocol.py`, -and every package `__init__.py`. Source integrity is now frozen by policy -`ecm-tqag.source-discovery.v1`: `dry_run.py`, `run_smoke.py`, and every `**/*.py` -under the `ecm_tqag` package, excluding `__pycache__`, `.pytest_cache`, `tests`, -`runs`, and `.git`. A required-files floor additionally pins `io.py`, `protocol.py`, -and the package initializers. - -This is a strict widening of what is hashed. Discovery fails closed when a required -module is unreachable or a package root is absent, and the execution gate blocks on -any digest change or on a file that appears after freezing. Consequently, code that -was never hashed cannot execute under a frozen record. - -## Pre-outcome bbox-coordinate and cumulative-accounting amendment - -Before any construction endpoint or comparative study outcome was observed, two -fail-closed extraction runs showed that provider-side image resizing made pixel -coordinates unverifiable against local source dimensions. The reader contract was -therefore changed to a fixed 0--1000 full-image grid, converted deterministically to -the planner's [0,1] coordinates. Out-of-range or reversed boxes are rejected; no box -is clipped, repaired, or rescaled from an inferred provider resolution. - -## Pre-outcome caption-schema enforcement amendment - -A subsequent fail-closed extraction attempt returned 16 caption relations although -both the frozen prompt and local parser cap the interface at 12. No construction or -comparative endpoint had yet been observed. The request now supplies a strict JSON -Schema expressing the already frozen three-key caption contract and its 1--12 -relation bound. The local parser remains authoritative and performs no truncation, -repair, or coercion. The eight attempts from that failed run and the six preceding -replacement-freeze smoke attempts remain in the cumulative ledger. - -## Cumulative accounting after the caption amendment - -All 40 HTTP attempts spent before this replacement freeze are carried forward. With -486 current-freeze base calls, the study base is 526. The unchanged hard cap of 550 -therefore leaves a 24-call retry reserve; the nominal 53-call 10% reserve is reduced -rather than expanding the cap. No experimental phase or endpoint was enlarged. - -## Pre-outcome cumulative accounting after verified cross-freeze import - -Before construction or any comparative endpoint was observed, the append-only ledgers -were reconciled across all replacement freezes. The cumulative count is 96 actual HTTP -attempts: 40 attempts recorded before the caption-schema replacement, followed by six -role-smoke attempts and 25 extraction attempts under `paid_caption_v2`, six role-smoke -attempts under `smoke_import_v4`, and 19 further extraction attempts under -`paid_import_v4`. Attempts are counted even when the returned body fails local schema -validation. - -A pure fail-closed importer independently verifies the origin freeze, request payload, -provider/model identity, task and image identity, response path and byte hash, and local -schema outcome. The two extraction ledgers jointly cover 44 distinct frozen extraction -tasks. Forty-two responses parse to usable interfaces; two are preserved as terminal -`SCHEMA_REJECTED` intent-to-treat outcomes (one out-of-grid graph and one overlong -caption). A rejected one-call task is not retried or converted into a successful record, -but downstream tasks that require its interface are marked unavailable under the frozen -missingness policy. Consequently, all 44 paid task calls are satisfied, the replacement -freeze has 486 gross base calls, 442 remaining base calls, and a study base of 538 -(= 96 + 442). The unchanged hard cap of 550 permits at most 12 retry attempts, so the -replacement run ledger is capped at 454 (= 442 + 12). No scientific endpoint, arm, -sample, prompt contract, or stopping rule was changed. - -## Post-execution reconciliation note - -This note records accounting after the frozen run; it is not a protocol amendment. -Append-only ledgers contain 246 actual HTTP attempts across all replacement freezes -and smoke runs: 119 attempts before the final freeze, six final-freeze role smokes, -and 121 fresh paid-run attempts (81 construction and 40 sensitivity-control calls). -Every final paid-run attempt has one start and one terminal record, HTTP status 200, -and zero retries. Imported extraction and construction records were not billed again. -The cumulative total remained below the unchanged hard cap of 550. diff --git a/machine-policy-audit.json b/machine-policy-audit.json index 91c97a7..d7ee54b 100644 --- a/machine-policy-audit.json +++ b/machine-policy-audit.json @@ -1,8 +1,8 @@ { "audit_kind": "deterministic-string-and-boundary-check", - "checked_file_count": 218, + "checked_file_count": 203, "findings": [], - "repo_tree_digest": "6dc0737daa52eaecc7106c87282917269fce0422075f4cab0bc634337f9f2fe6", + "repo_tree_digest": "96445d36995f3ec2d8962365ffd9723838eefd93b546b7306f4c9d72ad96d4a3", "schema": "ecm-tqag.machine-policy-audit.v1", "semantic_validation": false, "status": "PASS"