Skip to content

fix(verification): final pubbundle reviewed-sources re-pin at 8f65f3c5 (125-row disposition) - #191

Merged
matthewpeterkort merged 6 commits into
feature/postgres-backendfrom
ao/pubbundle/final-re-pin
Nov 13, 2026
Merged

matthewpeterkort merged 6 commits into
feature/postgres-backendfrom
ao/pubbundle/final-re-pin

Conversation

@matthewpeterkort

Copy link
Copy Markdown
Collaborator

What

Single authoritative re-pin of verification/publication-bundle/reviewed-sources.json at repo tip 8f65f3c5: every derivation-claiming field (md5/sha256/contentMD5/expectedMD5 + bare-hex rows + artifact sha256 credentials + pin attributions) recomputed against the actual git show HEAD:<path> blobs. Every mismatch fixed to the true computed value — no expectation was ever adjusted to admit a stale digest (a stale-but-plausible digest is treated as the fatal class it is).

Tool: scripts/recompute_reviewed_ledger.py — rerunnable, row-by-row. Scan classes gated: MISMATCH, SHAPE-ANOMALY, PROSE-VALUE, UNRESOLVABLE-A/B, PATH-UNRESOLVED, BLOB-MISSING for head-blob attestation fields; historical receipt subtrees (repair_units, repin blocks) and verified snapshot-bound rows are reported but never gated. --apply writes only true values and stamps pubbundleRepin receipts (pre/post, movedAt, pinCorrection).

Headline numbers (measured at 8f65f3c)

class count disposition
files-map md5/sha256 mismatches 72 re-pinned to HEAD blob
model scalars (fB22Tier1Md5s x4, reconcileDangleTrust.contentMD5) 5 re-pinned
status_updates[F-B15-ledger-pin] 1 re-pinned to HEAD md5, prior value's verified-at commit recorded
stale pin attributions 48 re-attributed to first commit whose blob produced the claimed digest
artifact sha256 claims (confirmed + preventedArtifacts) 19 9 verified against real blobs (evidence attached); 10 untraceable -> replaced with HEAD value + receipt
unresolvable files keys — A-class (stale path) 15 14 repointed across 32e8ad3, aliases.go (deleted b2da41e) retired with reason
unresolvable files keys — B-class (malformed label) 3 retired with per-key reason, prose preserved verbatim
verified-clean 46 pre-scan MATCH + 133 post-scan MATCH untouched

internal/catalog/types.go: 6b84be97… (stale-from-base, broken by merged 4878319) -> 418edc97… (true HEAD md5). internal/backends/postgres/control/vocabulary_control.go: 5d41b670… -> 06d0597c….

Canonical form preserved: json.dumps(indent=2, ensure_ascii=False)+"\n" roundtrip byte-identical (asserted by the tool after apply).

Row-by-row recompute tables

files-map mismatches re-pinned to HEAD blob (72 rows)

section key field claimed (stale) computed (true, now pinned)
files internal/api/graphql/graph/query/input_resolution.go md5 df658e046d1b 5343dad874ae
files internal/api/graphql/graph/query/read_scope_ingress_control_chars_e2e_test.go md5 a4d48d8e743c 62d7e7ca59a1
files internal/api/graphql/graph/resolver/recipe_execution_reader.go sha256 c9cfd2c27c03 b00d64740dce
files internal/api/graphql/graph/resolver/recipe_execution_reader_authz_e2e_test.go md5 2ca07086a0af 65d52b1fac00
files internal/authscope/auth_path_control_ingress_test.go md5 e65c7bc98c33 6efb01fbd8b0
files internal/authscope/fence_resource_access.go md5 2da4e1e7b008 4191b0a3bf89
files internal/dataframe/publication/clickhouse/bundle_store.go sha256 b034db9a50f1 1dce5b82c34c
files internal/dataframe/publication/clickhouse/orphaned_published_growth_e2e_test.go md5 48796dc93018 28be13895ce9
files internal/dataframe/publication/clickhouse/pointer_name_nul_ambiguity_e2e_test.go md5 8f3d1c9ae8e9 fd40143f0607
files internal/dataframe/publication/clickhouse/reconcile_toctou_e2e_test.go md5 30e97601ec8f efae8c7847c6
files internal/dataframe/publication/clickhouse/release_dangle_reconcile_e2e_test.go md5 770ada2b907b 4c539989e614
files internal/dataset/release.go md5 1118624d9f2d 03ee181e34cf
files internal/dataset/release_requirements_e2e_test.go md5 1ef6caca9673 5d96cd4c619f
files internal/server/openapi_recipe_execution.go sha256 2fb6066b0441 05d8c4686c9b
files internal/server/options.go sha256 7754040c1091 4366f81c2270
files internal/server/recipe_execution_status_twin_e2e_test.go md5 67bfaf542823 8dc0c769b8df
files internal/server/recipe_execution_twin_authz_repair_test.go md5 f629ff8e79b1 f2efbe453a88
files internal/server/server.go md5 d99dcc0db26d d95a4e109e2e
files internal/server/server.go sha256 d158ce26c9e1 22e979cc9198
files verification/publication-bundle/FINDINGS.md sha256 e10ca876747f d22a4774e180
files verification/publication-bundle/OPERATOR_REVIEW_DIGEST.md md5 0b0bf2613fcd b11e28904f3f
files internal/explorer/lifecycle/publish_release_requirements_classification_test.go md5 1a7ea43cdeb6 be762a74427e
files internal/catalog/types.go (bare-row) 6b84be9759db 418edc971192
files internal/api/bulk/load/cross_project_dataset_authorization_e2e_test.go (bare-row) 84b3aa883512 4244ae518928
files internal/authscope/covers_execution_paths_control_test.go sha256 9bf8b1662ec5 31ddf950cdb1
files internal/authscope/all_generations_cache_key_test.go md5 c70b83bb1c61 4e25d1598c49
files internal/authscope/auth_resource_path_options_conflict_test.go md5 69bbbe193a47 2f8c235c065a
files internal/authscope/scope_cache_key_namespace_test.go md5 dc7accfb0722 106713913d34
files internal/explorer/lifecycle/unpivot_source.go sha256 08f579274765 74b0ac608d5a
files internal/explorer/lifecycle/unpivot_source_test.go sha256 faa60db21136 147de264f89a
files internal/server/explorer_output_reconcile_unpivot_source_test.go md5 e43cfee809df 67f4bae95048
files internal/server/openapi_explorer_construction_unpivot_source_test.go md5 42e4b2b945f6 5d6adc272b56
files internal/acceptance/runner.go sha256 b0c7aa89a3f0 9a8ce5413cfa
files internal/server/core_authoring_protocol_formal_replay_test.go sha256 17799abb830e f487d96be3fd
files internal/explorer/lifecycle/fs1_reverse_order_collision_test.go sha256 f901042baf09 e867768b5c3a
files scripts/verify-ui/workflows/verify-explorer-unpivot-row-source.mjs sha256 0110894b5ffe 71e2422e444c
files internal/api/graphql/graph/dataframe/aggregates_test.go sha256 a923f2afdf21 919ebfe6cae8
files internal/explorer/lifecycle/construction_pivot_source.go sha256 e3539cf39477 e131b755c163
files internal/explorer/lifecycle/construction_pivot_source_test.go sha256 3565e4a4a5ec 94d3c015caaa
files internal/explorer/lifecycle/derive_source.go sha256 32da4974802e ba8bca5ef252
files internal/explorer/lifecycle/derive_source_test.go sha256 9bd5cff74ce8 61caceb1bf0b
files internal/explorer/lifecycle/filter_source.go sha256 6e82dbdf5933 90e916b59048
files internal/explorer/lifecycle/filter_source_test.go sha256 b5dd9ad1ccae fba9bc4953fd
files internal/server/openapi_explorer_construction_filter_source_test.go sha256 511f411c7ebe 4b9a1228360f
files verification/publication-bundle/SKILL.md sha256 2ee4c56c2b77 19f87af41e93
files scripts/verify-ui/registry.mjs sha256 bd8053144d12 4808335e5206
files docs/BUILDER_VERIFICATION.tsv sha256 761d3d6e95af 7b99c073e805
files internal/server/openapi_explorer_authoring_write_fault_test.go sha256 e14f4f5db04f 1719fb158062
files internal/server/openapi_explorer_authoring_direct.go sha256 9aaecd4e8835 478fc4434d89
files internal/server/openapi_explorer_direct.go sha256 b57e753f8205 8076b17b8f7a
files internal/explorer/lifecycle/filter_source_pivot_clear_test.go sha256 9b0c5ff56a88 ad1d5d58eadc
files internal/api/graphql/graph/resolver/recipe_execution_twin_wire_parity_test.go sha256 3505112d27b1 3e2d9bc6f29e
files internal/server/recipe_execution_etl_failure_fields_e2e_test.go sha256 244fdce8b045 4e667613bb7b
files internal/explorer/authoringv2/construction_projection_replay_test.go sha256 c09486b4442c ba945182535f
files internal/ci/vet_gate_test.go sha256 44b47d61f217 67ae10603736
files internal/api/bulk/load/operations.go sha256 50a0768a5593 dbf0581d9cfb
files internal/api/bulk/load/form_spillover_test.go sha256 b66be235d05b 12e0c661f6fd
files internal/api/recipe/discovery.go sha256 03e1528ed6aa 3f4ee1dac6ae
files internal/api/recipe/discovery_auth_mode_test.go sha256 966446cd7ec5 c66d29762272
files internal/ci/gofmt_gate_test.go sha256 cf758c1f7556 bf14ea793ed1
files conformance/compiler/generated_semantics_coverage_test.go sha256 6d37b4dfe7d2 e98efa2c1cc8
files generated/graphql/graph/executor/schema.generated.go sha256 7bb95f32c94f d266e30ed509
files internal/projectid/projectid.go sha256 107ca45ca51e ade73438be11
files internal/catalog/semantic_inventory.go sha256 3cd3f6a3e001 e40ea07e8757
files internal/store/clickhouse/client.go sha256 327b4d9f154e aa6e13e1e4f0
files internal/server/explorer_publication.go sha256 8aae339388a2 8232bed47679
files internal/server/options_schemas_test.go sha256 9182bbefcccc abadedff88e4
files internal/server/runtime.go sha256 8b191a060924 41a3d046d986
files internal/server/runtime_test.go sha256 d72f4a626a12 29ea8dd872c1
files internal/server/runtime_postgres_live_test.go sha256 36552734abd2 9346f2a0b3e9
files internal/backends/postgres/control/runtime.go sha256 c60c9ad2de1d d58b7bb400b4
files internal/backends/postgres/control/vocabulary_control.go sha256 5d41b67074db 06d0597caee8

model-section mismatches re-pinned (5 rows)

section key field claimed (stale) computed (true, now pinned)
model fB22Tier1Md5s internal/api/graphql/graph/query/input_resolution.go df658e046d1b 5343dad874ae
model fB22Tier1Md5s internal/api/graphql/graph/query/read_scope_ingress_control_chars_e2e_test.go a4d48d8e743c 62d7e7ca59a1
model fB22Tier1Md5s internal/authscope/auth_path_control_ingress_test.go e65c7bc98c33 6efb01fbd8b0
model fB22Tier1Md5s internal/authscope/fence_resource_access.go 2da4e1e7b008 4191b0a3bf89
model reconcileDangleTrust contentMD5 13b8bf3a2741 4c196436bd1d

status_updates pin re-pinned (1 rows)

section key field claimed (stale) computed (true, now pinned)
status_updates F-B15-ledger-pin (bare-pin) ab4cf9341193 aaaa60f999a5

stale pin attributions corrected (10 rows)

section key field claimed (stale) computed (true, now pinned)
pin internal/api/graphql/graph/resolver/recipe_execution_reader.go sha256 87ee09c7 -
pin internal/dataframe/publication/clickhouse/bundle_store.go sha256 e68c7d6b -
pin verification/publication-bundle/ConstructionPrepareLanes.tla sha256 49d6999e -
pin verification/publication-bundle/ConstructionProjectionOwnership.tla sha256 cf0ca558 -
pin scripts/verify-ui/workflows/verify-explorer-row-source-four-state.mjs sha256 7fcb640f -
pin scripts/verify-ui/helpers/tests/row96-row-source-four-state.test.mjs sha256 7fcb640f -
pin scripts/lib/formal-projection-replay.mjs sha256 2f6e64ea -
pin scripts/verify-ui/contracts/source-projection-contracts.mjs sha256 2f6e64ea -
pin scripts/ci/vet.mjs sha256 661de7b3 -
pin conformance/compiler/benchmark_test.go sha256 4e15704f -

Pin attribution corrections (48 rows)

The recorded pin commit did not contain a blob matching the row's claimed digest; re-attributed to the first commit whose blob actually produced it (full --follow history walk).

key pin (was) pin (now)
internal/api/graphql/graph/resolver/recipe_execution_reader.go 87ee09c7 48783199
internal/server/openapi_recipe_execution.go 87ee09c7 48783199
verification/publication-bundle/FINDINGS.md 4e15704f 8f65f3c5
internal/authscope/covers_execution_paths_control_test.go 4e15704f 48783199
internal/explorer/lifecycle/unpivot_source.go 8459f080 48783199
internal/explorer/lifecycle/unpivot_source_test.go d3a1d12a 48783199
internal/acceptance/runner.go f177a9ed 48783199
internal/server/core_authoring_protocol_formal_replay_test.go fdf2969e 48783199
verification/publication-bundle/ConstructionPrepareLanes.tla 49d6999e 8f65f3c5
internal/explorer/lifecycle/fs1_reverse_order_collision_test.go 34e4741d 48783199
scripts/verify-ui/workflows/verify-explorer-unpivot-row-source.mjs 29d2c5b0 2fbb0992
internal/api/graphql/graph/dataframe/aggregates_test.go 9d092c5b 48783199
verification/publication-bundle/ConstructionProjectionOwnership.tla cf0ca558 8f65f3c5
internal/explorer/lifecycle/construction_pivot_source.go d3a1d12a 48783199
internal/explorer/lifecycle/construction_pivot_source_test.go d3a1d12a 48783199
internal/explorer/lifecycle/derive_source.go 8459f080 48783199
internal/explorer/lifecycle/derive_source_test.go d3a1d12a 48783199
internal/explorer/lifecycle/filter_source.go d3a1d12a 48783199
internal/explorer/lifecycle/filter_source_test.go d3a1d12a 48783199
internal/server/openapi_explorer_construction_filter_source_test.go 29d63f6f 48783199
verification/publication-bundle/SKILL.md 49d6999e 8f65f3c5
scripts/verify-ui/workflows/verify-explorer-row-source-four-state.mjs 7fcb640f 2fbb0992
scripts/verify-ui/helpers/tests/row96-row-source-four-state.test.mjs 7fcb640f 2fbb0992
scripts/verify-ui/registry.mjs 7fcb640f e5b5c27e
docs/BUILDER_VERIFICATION.tsv 7fcb640f e5b5c27e
internal/server/openapi_explorer_authoring_write_fault_test.go 3cfec1b7 48783199
internal/server/openapi_explorer_authoring_direct.go 3cfec1b7 48783199
internal/server/openapi_explorer_direct.go 3cfec1b7 48783199
internal/explorer/lifecycle/filter_source_pivot_clear_test.go 8459f080 48783199
internal/api/graphql/graph/resolver/recipe_execution_twin_wire_parity_test.go 87ee09c7 48783199
internal/server/recipe_execution_etl_failure_fields_e2e_test.go 87ee09c7 48783199
internal/explorer/authoringv2/construction_projection_replay_test.go 2f6e64ea 48783199
scripts/lib/formal-projection-replay.mjs 2f6e64ea 8f65f3c5
scripts/verify-ui/contracts/source-projection-contracts.mjs 2f6e64ea 8f65f3c5
scripts/ci/vet.mjs 661de7b3 8f65f3c5
internal/ci/vet_gate_test.go 661de7b3 48783199
internal/api/bulk/load/operations.go d2ff3d03 48783199
internal/api/bulk/load/form_spillover_test.go d2ff3d03 48783199
internal/api/recipe/discovery.go adfff030 48783199
internal/api/recipe/discovery_auth_mode_test.go adfff030 48783199
internal/ci/gofmt_gate_test.go 4e15704f 48783199
conformance/compiler/benchmark_test.go 4e15704f 8f65f3c5
conformance/compiler/generated_semantics_coverage_test.go 4e15704f 2fbb0992
generated/graphql/graph/executor/schema.generated.go 4e15704f faffab39
internal/projectid/projectid.go d5b5491b 48783199
internal/catalog/semantic_inventory.go d5b5491b 48783199
internal/store/clickhouse/client.go d5b5491b 48783199
internal/backends/arango/internal/catalog/all_generations_project_binding_integration_test.go dc52ed0a 80bca9a5

Artifact sha256 adjudication (19 claims)

Each claim checked against: git show <sourceSnapshot>:<path>, HEAD blob, file history (--follow), then a full git rev-list --objects --all sha256 scan of every object ever committed. Claims matching no object were replaced with the true HEAD value and stamped artifact-untraceable-repinned-to-head-blob.

entry path sha256 (now) adjudication
F-B1 internal/dataframe/publication/clickhouse/reconcile_toctou_test.go 38f8004da1db (was aaa139ca86d1) head-blob @ a2e87763
F-B1 internal/dataframe/publication/clickhouse/reconcile_toctou_e2e_test.go 0f9cbc65164e (was b13b9f1ce8df) head-blob @ a2e87763
F-B3 internal/dataframe/publication/clickhouse/pinblock_reconcile_e2e_test.go 9a74598f94e9 object-db-scan @ 313033284667
F-B6 internal/dataframe/publication/arango/name_latest_binding_e2e_test.go a3ca98434fb2 file-history-blob @ e5b5c27e
F-B7 internal/dataframe/publication/arango/dangling_binding_e2e_test.go 0c20e8e78ec6 (was 3dfeedf8e1e5) head-blob @ a2e87763
F-B11 internal/dataframe/publication/arango/release_dangle_reconcile_e2e_test.go b9286f56595c (was cce2c29d5bf6) head-blob @ a2e87763
F-B12 internal/dataframe/publication/arango/release_dangle_reconcile_e2e_test.go b9286f56595c (was cce2c29d5bf6) head-blob @ a2e87763
F-B13 internal/explorer/arango/cross_generation_publish_e2e_test.go c5846991e917 object-db-scan @ ded623b2e8a5
F-B14 internal/dataset/release_requirements_e2e_test.go da4f7ae6ba9a (was 645592cd4370) head-blob @ a2e87763
F-B15 internal/dataset/arango/revision_inflation_e2e_test.go b01ab91e9146 object-db-scan @ 052625a6e895
F-B16 internal/dataframe/publication/clickhouse/publish_partial_pointer_e2e_test.go a4e3dd51f360 (was cf13d635dcd9) head-blob @ a2e87763
F-B17 internal/dataset/arango/generation_activation_cas_e2e_test.go 613046287ad2 (was 70e9f8885b3a) head-blob @ a2e87763
F-B19 internal/dataframe/publication/clickhouse/orphaned_published_growth_e2e_test.go 3fa599c69158 (was da5d26c54d3e) head-blob @ a2e87763
F-B21 internal/dataframe/publication/clickhouse/pointer_name_nul_ambiguity_e2e_test.go 499574cb828c object-db-scan @ 38a573ed46c0
F-B21 internal/dataframe/recipe/publication_identity_nul_http_test.go 19d396a2ddeb object-db-scan @ 228a6785bfc7
F-B20 internal/api/graphql/graph/resolver/recipe_execution_reader_authz_e2e_test.go 1ecc2bd3cbcd object-db-scan @ c93d24539fba
F-B20 internal/server/recipe_execution_status_twin_e2e_test.go e88e8c9ce01c object-db-scan @ 8576b6d65581
F-B24 internal/dataframe/published/nullsort_page_cursor_e2e_test.go 18a7e4772af1 (was a57fd172b8b6) head-blob @ a2e87763
prevented internal/dataframe/publication/clickhouse/unpinned_page_read_e2e_test.go c64b56677eed file-history-blob @ e5b5c27e

A-class unresolvable keys — repointed (14 rows)

All 14 via commit 32e8ad3 (arch-backend-07 PR-2: adapter trees moved under internal/backends/arango).

stale key (was) repointed key (now)
internal/dataframe/execution/chartifact/arango/catalog.go internal/backends/arango/internal/chartifact/catalog.go
internal/dataframe/publication/arango/bundle_registry.go internal/backends/arango/internal/publication/bundle_registry.go
internal/dataframe/publication/arango/dangling_binding_e2e_test.go internal/backends/arango/internal/publication/dangling_binding_e2e_test.go
internal/dataframe/publication/arango/name_latest_binding_e2e_test.go internal/backends/arango/internal/publication/name_latest_binding_e2e_test.go
internal/dataframe/publication/arango/release_dangle_reconcile_e2e_test.go internal/backends/arango/internal/publication/release_dangle_reconcile_e2e_test.go
internal/dataset/arango/generation_activation_cas_e2e_test.go internal/backends/arango/internal/dataset/generation_activation_cas_e2e_test.go
internal/dataset/arango/manifest_lifecycle.go internal/backends/arango/internal/dataset/manifest_lifecycle.go
internal/dataset/arango/release_store.go internal/backends/arango/internal/dataset/release_store.go
internal/dataset/arango/revision_inflation_e2e_test.go internal/backends/arango/internal/dataset/revision_inflation_e2e_test.go
internal/explorer/arango/cross_generation_publish_e2e_test.go internal/backends/arango/internal/explorer/cross_generation_publish_e2e_test.go
internal/explorer/arango/selections.go internal/backends/arango/internal/explorer/selections.go
internal/explorer/arango/selections_cleanup_e2e_test.go internal/backends/arango/internal/explorer/selections_cleanup_e2e_test.go
internal/catalog/arango/resources.go internal/backends/arango/internal/catalog/resources.go
internal/catalog/arango/all_generations_project_binding_integration_test.go internal/backends/arango/internal/catalog/all_generations_project_binding_integration_test.go

A/B-class retired keys (4)

Preserved verbatim under retiredFilesKeys with per-key reason:

key reason
cross_generation_publish_e2e_test.go.explorer B-class malformed non-path key (authoring-time label, never a repo-relative path); retired from files map, prose preserved verbatim under retiredFilesKeys; the tracked counterpart row is internal/explorer/arango/cross_generation_publish_e2e_test.go (repointed)
release_dangle_reconcile_e2e_test.go [arango pkg] B-class malformed non-path key; retired from files map, prose preserved verbatim under retiredFilesKeys; tracked counterpart rows: the repointed arango-pkg row and internal/dataframe/publication/clickhouse/release_dangle_reconcile_e2e_test.go
release_dangle_reconcile_e2e_test.go [clickhouse pkg] B-class malformed non-path key; retired from files map, prose preserved verbatim under retiredFilesKeys; tracked counterpart row: internal/dataframe/publication/clickhouse/release_dangle_reconcile_e2e_test.go
internal/backends/postgres/aliases.go deleted at HEAD: removed by b2da41e (arch-09 root control facade deletion, #155); row is a commit-time D6 receipt, not a head-blob attestation; retained verbatim under retiredFilesKeys

status_updates

  • F-B15-ledger-pin: ab4cf9341193 (md5 of the revision-inflation artifact at e5b5c27e; stale since the relocation + comment strip) -> head md5 aaaa60f999a5, pinTarget internal/backends/arango/internal/dataset/revision_inflation_e2e_test.go.

On the "46-row out-of-scope stale inventory"

The acceptance note cites c6LedgerHygienePending (lane-05 census, /home/node/.ao/data/artifacts/loom-experiment-213/lane05-final-audit-census.json) for 46 out-of-scope stale rows. That census section actually carries 18 keys (count: 18, subclasses A=15/B=3) — all dispositioned above. The census contains no 46-row list under any key; the closest prior inventory is lane-04's lane04-dual-ledger-273pin-recompute-v2.json (different base 9534829d: 50 stale + 14 broken of 273), long since superseded. This PR therefore dispositions the complete stale population measured at the current tip (125 rows: 78 claim mismatches + 19 artifact credentials + 18 unresolvable keys + 10 stale pins, tabled above), which strictly covers any 46-row subset of the tip state.

Safety / scope

Validation (all at final source)

  • python3 scripts/check_no_code_comments.py --all-tracked -> exit 0, scanned=2971 violations=0 unresolvable-ledger-key=0 unsupported=0
  • python3 -m unittest scripts.tests.test_no_code_comments -> 50/50 OK
  • GOPROXY=off go test -count=1 ./internal/... -> exit 0, 73 packages ok, 0 FAIL
  • go test -count=1 ./conformance/... -> ok
  • gofmt -l clean; go vet ./internal/... clean; go build ./... clean
  • Ledger canonical roundtrip byte-identical; re-scan of the applied ledger: 0 gated failures

Recompute every derivation-claiming field in
verification/publication-bundle/reviewed-sources.json against the
git show HEAD:<path> blobs and fix all mismatches to true computed
values; expectations were never adjusted to admit stale digests.

- 78 files-map md5/sha256 mismatches re-pinned (incl internal/catalog/
  types.go 6b84be97->418edc97 broken by 4878319, vocabulary_control.go
  5d41b670->06d0597c), 10 stale pin attributions corrected to the first
  commit whose blob actually produced the claimed digest
- 4 model fB22Tier1Md5s entries + reconcileDangleTrust.contentMD5
  re-pinned; canonicalProbe/model canonical scalars verified MATCH
- 15 A-class unresolvable keys dispositioned: 14 repointed across the
  32e8ad3 internal/backends/arango relocation, aliases.go (deleted
  b2da41e) retired under retiredFilesKeys with reason
- 3 B-class malformed keys retired under retiredFilesKeys with
  per-key reason and tracked-counterpart notes
- 19 confirmed/prevented artifact sha256 claims adjudicated against
  snapshot blob, head blob, file history, and a full
  git rev-list --objects --all scan: 9 verified against real blobs
  (evidence attached), 10 matched no object ever committed and were
  replaced with true head values + untraceable-credential receipts
- status_updates[F-B15-ledger-pin] re-pinned to head md5 with the
  prior value's verified-at commit recorded
- scripts/recompute_reviewed_ledger.py: rerunnable row-by-row recompute
  + apply tool (scan classes gated; historical receipts never gated)
- checker test inverted to assert zero unresolvable keys, plus a new
  test that every ledger files key resolves to a tracked HEAD path

Validation: check_no_code_comments --all-tracked exit 0
(unresolvable-ledger-key=0, violations=0); unittest checker harness
50/50; go test -count=1 ./internal/... exit 0 (73 pkgs ok);
conformance/compiler ok; gofmt/vet/build clean; canonical
json.dumps(indent=2, ensure_ascii=False)+newline roundtrip holds.
… rows

The re-pin tool attached repointFrom receipts only to dict rows; the five
relocated rows whose ledger value was prose (manifest_lifecycle.go,
selections.go, selections_cleanup_e2e_test.go, chartifact catalog.go,
name_latest_binding_e2e_test.go) now carry the same repointFrom/viaCommit
audit as the other nine, prose preserved verbatim under note. Regenerated
from the 8f65f3c baseline with the updated tool; all 169 fixes otherwise
byte-identical. Checker --all-tracked exit 0; checker harness 50/50.
…entory class

The checker's unresolvable-ledger-key inventory reporting had lost its only
live coverage when the pubbundle ledger's malformed keys were dispositioned:
test_unresolvable_ledger_keys_are_inventory_not_red now asserts the repaired
state (empty inventory), so the reporting branch could regress to always-empty
without any test noticing. Add a synthetic-ledger test: stub
ledger_bound_paths with one nonexistent path, scan a clean Go file, assert the
inventory reports exactly that key with its ledger attribution and stays out
of violations. Coordinator ruling 2026-11-13 (loom-experiment-2): push now,
single append-only scripts/tests-only commit; reviewer auto-tracks, verifier
250 re-pins cheaply (ledger + tool blobs unchanged).

Validation: unittest scripts.tests.test_no_code_comments 51/51 OK;
check_no_code_comments --all-tracked exit 0 (violations=0,
unresolvable-ledger-key=0).

@matthewpeterkort matthewpeterkort left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed both PR commits (a2e8776, 20194c9) against base 8f65f3c: scripts/recompute_reviewed_ledger.py (new), scripts/tests/test_no_code_comments.py, and the ledger.

Verdict: requesting changes (4 inline comments; each is a required change). Event is COMMENT because GitHub rejects APPROVE/REQUEST_CHANGES on your own PR.

What checks out (static review): all 14 repointed keys carry repointFrom/viaCommit receipts and resolve at HEAD (git show); the 4 retired keys sit under retiredFilesKeys with verbatim retained rows; 48 pinCorrection receipts, none null; the named scalar re-pins (types.go 6b84be97 to 418edc97, vocabulary_control.go 5d41b670 to 06d0597c, the 4 fB22Tier1Md5s entries, reconcileDangleTrust.contentMD5) are cross-consistent between files rows and model sections; receipts preserve pre values (expectations were not adjusted to admit stale digests); the only mechanical reader of this ledger, check_no_code_comments.ledger_bound_paths, consumes files only, so the status_updates str-to-dict change and artifact sha256Verification additions do not break tooling; the builder-interactions ledger is untouched; the 20194c9 tool change is a genuine fix (relocated prose rows previously got no repoint receipt).

Not verifiable in this review sandbox (read-only git/gh only): independent recomputation of the new digests against blobs, the checker/pytest suites, and the canonical roundtrip claim. Digest correctness therefore rests on the tool receipts plus CI; CI must stay green before merge.

Findings requiring changes (inline): (1) model scan/apply only checks fields named md5/sha256/contentMD5/expectedMD5, so the hex claim in model.nullPageCoverage.tla, the only credential for NullPageCoverage.tla, is invisible to the sweep and exits 0 regardless of drift; (2) the docstring promises confirmed/prevented artifact claims gate with MISMATCH but the code passes gated=False, so artifact sha256 drift never fails the gate; (3) the 931-line ledger-mutating tool ships with no tests despite the scripts/tests convention; (4) re-pinned rows keep rederived SELF-RUN prose that now contradicts the corrected values (repeated across the pinCorrected rows).

Optional suggestions (no change required): pass the old relocation path as extra_paths to first_moved_at in the files loop so a future rerun cannot attribute movedAt/pin to the 32e8ad3 move commit when the digest predates the move (trace_claim already does this); object-db-scan proves blob existence, not artifact provenance, so the headline wording could be sharper; sha256Verification.commit a2e8776 reflects regen-time HEAD during the second commit (blob-identical to 8f65f3c on pinned paths, so digests are unaffected); add a fixture test for the unresolvable-key-is-inventory-not-red mechanism since the inverted repo test no longer exercises it; the preventedArtifacts verification note says recorded sourceSnapshot although preventedArtifacts has no snapshot (baselineCommit is used).

Comment thread scripts/recompute_reviewed_ledger.py Resolved
Comment thread scripts/recompute_reviewed_ledger.py Resolved
Comment thread scripts/recompute_reviewed_ledger.py Resolved
…#191 r4565972024

The model scan and apply verified only fields NAMED md5/sha256/contentMD5/
expectedMD5, so a hex-valued claim under another name was invisible to the
gate. model.nullPageCoverage.tla holds the md5 of NullPageCoverage.tla
(1372a87cbf2ee82f8366df1d525b9f96) and that file is pinned nowhere else in
the ledger - exactly the class the review comment identified.

Extend both sides through one enumerator (model_section_claims): named
claims now include digest (wiring the previously unused CLAIM_ALGO auto
entry) and tla-when-bare-hex (md5/sha256 by length), with resolve_algo for
auto-length dispatch; scan and apply can no longer diverge on the field
list. Path-valued tla fields are untouched.

Re-derivation: the nullPageCoverage.tla claim is TRUE against the HEAD
blob (scan row: model/nullPageCoverage/tla MATCH, scanned 220->221), so no
ledger value changed and the ledger blob stays byte-identical.
Non-vacuity control: corrupting the field in place to 0*32 yields
GATED-FAIL MISMATCH claimed=0000... computed=1372a87c... with tool exit 1;
ledger restored byte-identical afterward.

Validation: scan exit 0 with the new gated row; comment gate exit 0 on the
tool; ledger git-clean.
…tes, add tool tests (review #191)

Three findings from the adversarial pass on #191:

1. Gating contract (thread r4566...) — the docstring promised artifact
   claims gate, but both check_claim calls passed gated=False, so a
   digest mismatch could only surface as SNAPSHOT-DRIFT (never gated).
   _artifact_claim now gates the @Head row unless the claim verifies
   against its sourceSnapshot blob or a recorded sha256Verification blob
   (_artifact_backed: re-checks file-history-blob/sourceSnapshot-blob
   commits, or membership via object-db-scan). On the live ledger: the
   10 head-repinned artifact digests now gate as MATCH and the 9
   evidence-backed claims stay SNAPSHOT-* report-only; scan exit 0.

2. Superseded attestations (reviewer BBlU) — 48 files rows kept a
   rederived SELF-RUN quote asserting live == git show <old>:<path> ==
   on-disk beside a corrected pin. Checker.stale_quotes re-derives every
   quoted blob and emits report-only SUPERSEDED-PROSE; --apply stamps
   pubbundleRepin.rederivedSuperseded (quotes, cited digests, pinned
   claims, note) so no false quote stands unqualified. Applied: exactly
   48 stamp additions, zero digest-value changes, idempotent on rerun.

3. Test coverage (reviewer BBlI) — new scripts/tests/
   test_recompute_reviewed_ledger.py builds a fixture git repo and
   covers MISMATCH re-pin receipt shape (pre/post/movedAt/ticket),
   SHAPE-ANOMALY and PROSE-VALUE gating, repoint-merge with both keys
   present, plain repoint receipt, prose-str-to-{md5,note} upgrade,
   model hex-tla gating, artifact head gating with and without
   evidence, superseded-quote report/stamp/idempotence, and the
   canonical JSON roundtrip through main() --apply. 9/9 pass.

Also: the repoint-merge branch was silent (no FIX note) — now recorded;
resolved_tracked moved from an id()-keyed global cache (id-reuse hazard)
to a per-instance memo; docstring exit-gate paragraph matches behavior.

Validation: scan exit 0 (221 rows, 0 gated failures, 0 SUPERSEDED-PROSE
after stamping); checker --all-tracked exit 0 (unresolvable=0,
violations=0); scripts/tests full discovery OK; comment gate exit 0 on
both touched scripts; ledger canonical roundtrip byte-exact.
…ifier F-2, coordinator ruling)

WAVE ADDENDUM verdict, option (i) chosen: adjudicate_artifact now skips
re-derivation entirely when an artifact row's sha256 claim already
matches the live head (or sourceSnapshot) blob AND its recorded
sha256Verification block re-verifies against its cited blob
(verification_reverifies: git show for sourceSnapshot-blob /
file-history-blob / head-blob, object-index membership for
object-db-scan). Evidence-gated, not unconditional: the stale-block
control test proves an unverifiable block is still rewritten. The
docstring --apply paragraph now states the contract.

Chosen over option (ii) because skip-if-live-true+backed makes drift
impossible to mask while giving strict byte stability; historical
file-history/object-db rows stay on the active repair path and land on
an identical fixed point (deterministic trace derivation).

Proof at this head: python3 scripts/recompute_reviewed_ledger.py --apply
run twice against the committed ledger -> cmp byte-identical both times
(10 live-true rows skip with 'no rewrite', 9 historical rows re-derive
identical traces). Scan unchanged: exit 0, 221 rows.

Fixtures: test_apply_noop_on_converged_artifact_verifications (double
--apply, byte-identical, no 'verified via' rewrite lines) and
test_stale_artifact_verification_is_rewritten (unverifiable block ->
rewritten to sourceSnapshot-blob trace). Tool suite 11/11; scripts/tests
discovery 110 OK; checker --all-tracked exit 0; comment gate exit 0.
Ledger untouched by this commit.

@matthewpeterkort matthewpeterkort left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed the full PR range 8f65f3c..ecd7af1 (6 commits; the queue snapshot named head 238df82, and the branch has since added ecd7af1, which I also reviewed in full).

Verdict: approved — ready to merge once CI is green at ecd7af1. No inline comments; nothing requires a change.

Disposition of the four findings from my previous review — all fixed in committed code:

  1. Hex-valued model fields now gate. model_section_claims adds digest (auto-resolved via resolve_algo) and tla-when-hex; scan_model and apply_fixes share the helper. NullPageCoverage.tla (the credential that was previously invisible) now scans via the _section_path fallback, its value matches the lane05Repin post-strip record, and the file is untouched since 8f65f3c; test_model_hex_tla_field_gates_and_repins covers MISMATCH plus re-pin with receipt.
  2. Artifact gating contract is honest now. _artifact_claim passes gated=not backed, where backed = sourceSnapshot blob match or sha256Verification re-verification (sourceSnapshot-blob/file-history-blob via git show, object-db-scan via object-index membership). Docstring matches code. Fixtures cover both directions: test_artifact_head_gates_without_evidence (ungrounded claim exits 1 with MISMATCH) and test_artifact_snapshot_and_evidence_stay_report_only.
  3. The tool has a test suite: scripts/tests/test_recompute_reviewed_ledger.py, 11 fixtures over synthetic git repos, covering all five scenarios I asked for (MISMATCH receipt shape with movedAt, SHAPE-ANOMALY plus PROSE-VALUE gating, repoint-merge branch, prose-string str-to-note path, canonical roundtrip) plus repoint-with-receipt, model hex tla, artifact gating, superseded-quote stamping, and ecd7af1 adds double-apply byte-noop plus stale-verification rewrite controls.
  4. Stale SELF-RUN quotes are now adjudicated, not left silently contradicting re-pinned values. stale_quotes emits SUPERSEDED-PROSE (report-only) and --apply stamps pubbundleRepin.rederivedSuperseded with quotes, citedDigests and pinnedClaims evidence; scan skips stamped fields so the sweep is idempotent. I spot-checked stamps: quote paths align with the row (or its pre-move path at the cited commit), and cited digests match the recorded pre values, so the note (predates the final re-pin, historical evidence only) is accurate.

ecd7af1 review: the convergence guard is evidence-gated, not unconditional — skip requires the claim to be live-true at head or sourceSnapshot AND the recorded sha256Verification to re-verify against its cited blob; a drifted file makes true_at_head false so drift cannot be masked. Historical file-history/object-db rows stay on the active repair path with deterministic trace derivation. The two fixtures prove both the no-op and the stale-block rewrite.

Verification basis and limits: read-only reviewer sandbox; I did not execute the tool or test suites. Static review of all changed code plus worker receipts (tool suite 11/11, discovery 110 OK, double-apply byte-identical, checker and comment gate exit 0) and CI: at 238df82 every completed check is green (Python tests green; the two cancels are supersessions by the newer push). At ecd7af1 checks are still running and Tests / Python tests is queued — require it green before merge, since it is the gate for scripts/tests.

Optional suggestions (no change required): (1) model apply re-pins any claim-named field including digest without a hex guard, unlike tla; the ledger currently uses digest only as a path pointer under operator (outside model), but a future path-valued digest in a model section would be silently overwritten on --apply — consider requiring hex for digest claims. (2) stale_quotes stamps any string field containing git show; a comparative quote about a different file would get a predates-the-re-pin note — the stamp preserves full quote evidence so it is auditable, but the note wording could hedge. (3) resolved_tracked re-copies the already-cached set from Git.tracked().

@matthewpeterkort matthewpeterkort left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed PR #191 at head ecd7af1 (queue snapshot head; full range 8f65f3c..ecd7af1, 6 commits, 4 files).

Verdict: approved. No inline comments; nothing requires a change.

All four findings from my prior review are resolved in committed code:

  1. Hex-valued model fields now gate. model_section_claims covers digest (via resolve_algo) and tla-when-hex; scan_model and apply_fixes share the helper. NullPageCoverage.tla — the credential that was previously invisible to the sweep — is now scanned via _section_path fallback and its value matches the lane05Repin post-strip record (file untouched since 8f65f3c). Fixture: test_model_hex_tla_field_gates_and_repins asserts MISMATCH-then-re-pin-with-receipt.

  2. Artifact gating contract matches the docstring. _artifact_claim passes gated=not backed, where backed = sourceSnapshot blob match OR sha256Verification re-verification against its cited blob (sourceSnapshot-blob/file-history-blob via git show, object-db-scan via object-index membership). Fixtures cover both directions: test_artifact_head_gates_without_evidence exits 1 with MISMATCH; test_artifact_snapshot_and_evidence_stay_report_only keeps evidenced rows report-only.

  3. The tool has fixtures. scripts/tests/test_recompute_reviewed_ledger.py, 11 tests over synthetic git repos: MISMATCH receipt shape with movedAt, SHAPE-ANOMALY + PROSE-VALUE gating, repoint-merge branch, prose-string str-to-note path, canonical roundtrip, repoint-with-receipt, model hex tla, artifact gating, superseded-quote stamping, plus ecd7af1 adds double-apply byte-noop and stale-verification rewrite controls.

  4. Superseded SELF-RUN quotes are now adjudicated, not silently contradictory. stale_quotes emits SUPERSEDED-PROSE (report-only) and --apply stamps pubbundleRepin.rederivedSuperseded with quotes, citedDigests, pinnedClaims evidence; scan skips stamped fields so the sweep is idempotent. Spot-checked stamps: quote paths align with the row (or its pre-move path at the cited commit) and cited digests match the recorded pre values, so the predates-the-re-pin note is accurate.

ecd7af1 (convergence guard) review: the skip is evidence-gated, not unconditional — adjudicate_artifact requires the claim to be live-true at head or sourceSnapshot AND the recorded sha256Verification to re-verify against its cited blob; a drifted file flips true_at_head false, so drift cannot be masked by a stale block. Historical file-history/object-db rows stay on the active repair path with deterministic trace derivation. The two new fixtures prove both the byte-noop and the stale-block rewrite.

CI status at ecd7af1: Tests / Python tests, Node unit tests, Go ClickHouse integration, Shell cleanup all completed success. The remaining checks (Go unit tests, Arango integration, UI checks/build, PostgreSQL spine, Compiled publication, Backend architecture conformance, Generated/OpenAPI contracts, PostgreSQL 18 fixture runner) are still in_progress. Since the tool changes and scripts/tests are gated specifically by Tests / Python tests, that gate is now green. Recommend waiting for the rest of the matrix to finish before merging, but nothing in the current evidence requires a code change.

Reviewer sandbox limits (unchanged): read-only git/gh; I did not execute the tool or pytest. Digest correctness rests on tool receipts + CI; my static review of the changed code plus prior-review disposition carries the verdict.

Optional suggestions (no change required): (1) model apply re-pins any claim-named field including digest without a hex guard, unlike tla; digest is currently a path pointer outside the model section but a future path-valued digest inside a model section would be silently overwritten on --apply — consider requiring hex. (2) stale_quotes stamps any string field containing git show; a comparative quote about a different file would still get a predates-the-re-pin note — the stamp preserves full quote evidence so it is auditable, but wording could hedge. (3) resolved_tracked still re-copies the already-cached set from Git.tracked().

@matthewpeterkort
matthewpeterkort marked this pull request as ready for review November 13, 2026 17:01
@matthewpeterkort
matthewpeterkort merged commit 80e8877 into feature/postgres-backend Nov 13, 2026
15 checks passed
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