[codex] retain nested and bound callable definitions - #2124
Merged
TheGreenCedar merged 4 commits intoSep 4, 2026
Merged
Conversation
TheGreenCedar
marked this pull request as ready for review
September 4, 2026 05:51
This was referenced Sep 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Result and context
Restore parser-established callable definitions that were absent from the source index. This is an upstream source repair under #2116, not evidence that the packet compiler qualifies.
The independent source-universe audit on #2120 showed that ranking could not recover some required source because the indexed definition did not exist. A neutral 72-combination syntax matrix reproduced 40 missing or misnamed definitions before the change. It does not contain evaluation repository or answer vocabulary.
Closes #2123. Refs #2116.
Changes
Review
native_declarators.rsand the graph rules first, then the conversion boundary inlib.rsand the neutral contract matrix. Packet retrieval, scoring, compiler policy and exact-proof policy are unchanged.Snapshot changes
The C++ fixture gains its reference-returning
Player::namedefinition, its membership/source occurrence and the existing resolver's call target. Related callsite ordinals and projection hashes follow from that added node.The TSX golden had an unrelated stale duplicate callable-state row. The same snapshot failure reproduced on clean base source at
a4f9242512e92af0e43d58987f4d27a67bbd6c91, whose indexer tree is identical to integration basefc6973d0bd4390cc1ae7814b3e4ee8236802b861. Existingprojection.rsalready collapses duplicate symbol keys to SQLite's last-wins shape. Only that obsolete expected row was removed; production projection code was not changed.Verification
Source head:
897f3ab78a70dcd5e70cdbb4df0cb9d5d676345f.Tree:
afa7b230f59227cb3af5e80bff1f8c0854e21957.Base:
fc6973d0bd4390cc1ae7814b3e4ee8236802b861.Worktree:
/Users/albert/.codex/worktrees/2123-callable-definitions/CodeStory.Focused locked tests passed on the committed source:
callable_definition_fidelity: 8 passed, including the expanded 80-combination matrix, pointer-depth changes, specializations, native membership, prototypes/lambdas and reference/operator/destructor controls.query_rule_regressions: 22 passed, including 96 multiline private-scope variants, 24 anonymous/outside-scope controls, and 96 same-line layout/name/scope variants. The original scope matrix reproduced 48 wrong-target failures; the same-line matrix reproduced 96 failures before the occurrence-bound correction.native_rule_regressions: 32 passed.fidelity_regression: 8 passed.tictactoe_language_coverage: 13 passed.language_extraction_snapshot: 3 passed.The independent initial review found two causal classes: omitted legal native declarators and private expression calls incorrectly selecting outer functions. The first follow-up accepted the native repair but found that delayed scope annotation incorrectly used a shared same-line target-node span. That annotation seam is now removed: each original graph occurrence receives its scope before edge identity/deduplication. Independent correction verification accepted this exact head: all 29 retained scope probes and 55 focused checks passed; native acceptance remains unchanged.
Preserved review receipts:
/Users/albert/.codex/evidence/codestory-2123-verifier.FWCIxV/receipt.json, SHA-2564bd01c3f0d0d0ad2b7507e3e9baa859c7f3c1dbad159c263f3e7296f0938db64./Users/albert/.codex/evidence/codestory-2123-corrections.qf2D2r/receipt.json, SHA-256eb16c27e76c652219f1156da5b717578be52cc3938eed813aa40249b15192b00./Users/albert/.codex/evidence/codestory-2123-f2-seam.eydctZ/receipt.json, SHA-256274422e605be06c52080358f1637a1874080f0b09af8bac093b4218ce2b3f9e5.Applicable CI passed on this head: draft source checks (
33840343760), retrieval/transport contracts (33840343673), crate durability (33840343783), rustdoc (33840343815) and the issue-link guard. The Windows missing-manifest cell was intentionally skipped. This is support-PR verification, not release source stabilization or product qualification. No installed-runtime, calibration or release proof has run for this patch. Existing failed packet receipts and the old stop remain preserved. Version remains 0.17.5.Risk and follow-up
Newly visible definitions change downstream source inventory and may improve existing navigation resolution. Call-proof authority still belongs to its separate closed syntax checks. The adversarial review checks ownership and ambiguity rather than inferring safety from symbol counts.
After integration, remeasure the source inventory and causal losses using fresh artifacts. Documentation extents and preprocessor recovery remain separate observed gaps; this PR does not claim to repair them.