Historical wrong-bind audit: blueprint deletion detector and wall-clock acceptance remain #300

Closed
opened 2026-09-26 01:12:37 +02:00 by buildagent · 5 comments
Member

Audit on published v0.41.45 (2026-11-08): the function-local Python import case shipped fixed in 0.41.45. Fresh signed-package CLI fixtures capture both JS parameter calls, the Rust closure call and the Python module use without the old wrong targets; the Python Client.fetch container control now resolves to models.py rather than an unrelated class. These are minimal-shape results, not a claim of complete language recall. The original six cases should not be treated as six newly required implementations. Remaining acceptance includes the separately reported deterministic register_blueprint deletion witness (current corpus_mutation still has an empty KNOWN_REBINDS registry and documents the victim-selection gap) and B3's historical quiet three-version wall-clock comparison. Raw current reproduction: /tmp/cosi-046-ticket-audit-container/verification.json; 0.41.45 local-import proof is linked in the latest release comment.


The independent final review of v0.32.1 (release-v0.32.1 @ f208704) found six wrong-bind shapes. Each one was already present in v0.32.0 (4e3034a), in 0.31.2 (dc841af), or in both, so none is a regression from the v0.32.1 work. They are filed here instead of being folded into that release. Fixtures and logs are under /tmp/final-review/ (fx/, q3/) on the build machine, and in reviewer B's /tmp/review-b/ (py1, js1, rs1).

  1. Python: a function-local import loses to a same-file symbol. from other import imp_target inside a function is overridden by a same-file definition of imp_target through tier 2 (rule 20). Fixture: py1 scope.py:88.
  2. JS: destructured parameters. In function destr({ other }) { other() }, other binds to the module-level other. Destructured parameter patterns are not recorded as locals.
  3. JS: module-level arrow parameters. In const f = (other) => other() at module level, other binds to the module function. I073 already records this as known.
  4. Rust: closure variables resolved across files. let f = |m| …; f(m) binds another file's f through T1B_SAME_DIRECTORY, because closure-bound let locals are not local facts.
  5. Python: import engine binds a conftest fixture. The import binds a same-directory conftest.py fixture named engine through T1B_SAME_DIRECTORY.
  6. Python: container import picks the wrong module. c.fetch binds other.py through T1B_CONTAINER_IMPORT even though Client is imported from models.

Also open, with the same provenance:

  • B3, wall clock. The deterministic evidence shows the per-pass Python re-parse is gone (django local_scope 4,381 → 374 ms). The interleaved django wall-clock runs are still noisier than the effect (load 4–9). A quiet-machine run comparing dc841af, 4e3034a and v0.32.1 is still needed before any wall-clock claim is published.

For each shape: add a precision-gate decoy that fails on the current tree, then fix it structurally, then measure the corpus bind by bind.

🤖 Generated with Claude Code

Audit on published v0.41.45 (2026-11-08): the function-local Python import case shipped fixed in 0.41.45. Fresh signed-package CLI fixtures capture both JS parameter calls, the Rust closure call and the Python module use without the old wrong targets; the Python Client.fetch container control now resolves to models.py rather than an unrelated class. These are minimal-shape results, not a claim of complete language recall. The original six cases should not be treated as six newly required implementations. Remaining acceptance includes the separately reported deterministic register_blueprint deletion witness (current corpus_mutation still has an empty KNOWN_REBINDS registry and documents the victim-selection gap) and B3's historical quiet three-version wall-clock comparison. Raw current reproduction: /tmp/cosi-046-ticket-audit-container/verification.json; 0.41.45 local-import proof is linked in the latest release comment. --- The independent final review of v0.32.1 (release-v0.32.1 @ f208704) found six wrong-bind shapes. Each one was already present in v0.32.0 (4e3034a), in 0.31.2 (dc841af), or in both, so none is a regression from the v0.32.1 work. They are filed here instead of being folded into that release. Fixtures and logs are under `/tmp/final-review/` (fx/, q3/) on the build machine, and in reviewer B's `/tmp/review-b/` (py1, js1, rs1). 1. **Python: a function-local import loses to a same-file symbol.** `from other import imp_target` inside a function is overridden by a same-file definition of `imp_target` through tier 2 (rule 20). Fixture: py1 `scope.py:88`. 2. **JS: destructured parameters.** In `function destr({ other }) { other() }`, `other` binds to the module-level `other`. Destructured parameter patterns are not recorded as locals. 3. **JS: module-level arrow parameters.** In `const f = (other) => other()` at module level, `other` binds to the module function. I073 already records this as known. 4. **Rust: closure variables resolved across files.** `let f = |m| …; f(m)` binds another file's `f` through T1B_SAME_DIRECTORY, because closure-bound `let` locals are not local facts. 5. **Python: `import engine` binds a conftest fixture.** The import binds a same-directory `conftest.py` fixture named `engine` through T1B_SAME_DIRECTORY. 6. **Python: container import picks the wrong module.** `c.fetch` binds `other.py` through T1B_CONTAINER_IMPORT even though `Client` is imported from `models`. Also open, with the same provenance: - **B3, wall clock.** The deterministic evidence shows the per-pass Python re-parse is gone (django `local_scope` 4,381 → 374 ms). The interleaved django wall-clock runs are still noisier than the effect (load 4–9). A quiet-machine run comparing dc841af, 4e3034a and v0.32.1 is still needed before any wall-clock claim is published. For each shape: add a precision-gate decoy that fails on the current tree, then fix it structurally, then measure the corpus bind by bind. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Author
Member

7. A pre-existing defect lost its detector in v0.32.1. corpus_mutation's single KNOWN_REBINDS row (flask register_blueprint, pre-existing since v0.20.3, needs receiver-type inference plus a class hierarchy) stopped firing. The defect is still there. What changed is the test's victim picker: it now deletes tests/conftest.py instead of the file it used to delete. The suite failed on the stale row, so the row was removed. Its measured reason is kept verbatim in record I076 (_prdoc/records/).

Needed: a deletion or rename case that deliberately targets the register_blueprint definition file, so the defect is exercised again and pinned as a KNOWN_REBINDS row until it is fixed.

🤖 Generated with Claude Code

**7. A pre-existing defect lost its detector in v0.32.1.** `corpus_mutation`'s single `KNOWN_REBINDS` row (flask `register_blueprint`, pre-existing since v0.20.3, needs receiver-type inference plus a class hierarchy) stopped firing. The defect is still there. What changed is the test's victim picker: it now deletes `tests/conftest.py` instead of the file it used to delete. The suite failed on the stale row, so the row was removed. Its measured reason is kept verbatim in record I076 (`_prdoc/records/`). Needed: a deletion or rename case that deliberately targets the `register_blueprint` definition file, so the defect is exercised again and pinned as a `KNOWN_REBINDS` row until it is fixed. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Author
Member

The function-local Python import subcase is fixed in v0.41.45, merged through #508. Calls use the visible proven import, including re-exports, multiline imports and one-line functions. Negative controls cover sibling scope, ambiguous/missing imports, reassignment and calls before import; provider removal/restoration and import removal are tested incrementally.

The pinned Django audit keeps all 483,197 reference sites: 11 correct bindings added, one target corrected and two false external Selenium bindings removed (+9 resolved references and edges). See the bind-by-bind audit. Full Linux/native Windows qualification and all nine published-artifact acceptance groups passed, including the shipped Python plugin cases.

Leaving this issue open for explicit acceptance accounting of the other historical shapes and the separate B3 quiet three-version wall-clock comparison; this release makes no claim that those are complete.

The function-local Python import subcase is fixed in [v0.41.45](https://git.h-dv.de/h-dv/code-index/releases/tag/v0.41.45), merged through #508. Calls use the visible proven import, including re-exports, multiline imports and one-line functions. Negative controls cover sibling scope, ambiguous/missing imports, reassignment and calls before import; provider removal/restoration and import removal are tested incrementally. The pinned Django audit keeps all 483,197 reference sites: 11 correct bindings added, one target corrected and two false external Selenium bindings removed (+9 resolved references and edges). See the [bind-by-bind audit](https://git.h-dv.de/h-dv/code-index/src/commit/3842ab6d5e194b9eefb402e81e567c9c62fa5d66/_prdoc/records/v0.41.45-python-local-imports.md). Full Linux/native Windows qualification and all nine published-artifact acceptance groups passed, including the shipped Python plugin cases. Leaving this issue open for explicit acceptance accounting of the other historical shapes and the separate B3 quiet three-version wall-clock comparison; this release makes no claim that those are complete.
buildagent changed title from Six pre-existing phantom-bind shapes found by the v0.32.1 final review (not regressions) to Historical wrong-bind audit: blueprint deletion detector and wall-clock acceptance remain 2026-11-08 13:54:47 +01:00
Author
Member

The missed Flask deletion witness is now reproduced and fixed locally in a63cf22a (not yet released). The regression deletes src/flask/sansio/app.py explicitly, verifies the five original tests/test_cli.py calls are present, and requires all 55 formerly bound register_blueprint references to become unresolved. Published 0.41.45 wrongly rebinds five to Blueprint.register_blueprint; the candidate passes.

The generic container-import arm now refuses captured receivers for closed-member profiles: importing a class is not evidence that an unrelated parameter has that class's type. Open trait profiles and uncaptured chains retain existing behavior. A shipped-producer positive/negative fixture verifies constructor-typed receivers still bind, and a simulated schema-90 upgrade discards the persisted wrong decisions. Schema 91 forces that rebuild. Removing the guard makes the regression fail.

Local compatibility: 58 member lookup, 5 C# extension safety, 17 capability registry and 15 schema tests pass. Paired published/candidate corpus comparison holds source, package bytes and captured reference populations fixed: Flask 15,365 references, 10 unsupported bindings withdrawn; Django 483,197 references, 52 unsupported bindings withdrawn and 96 same-target decisions use a stronger rule. No new targets. Some withdrawn calls are valid in the source but lack receiver-type proof in the current facts; this is an explicit recall cost, not a claim those calls are invalid. Evidence: /tmp/cosi-046-bind-audit-narrow/{python-flask,py-django}/verification.json and classification.json.

The historical quiet-machine wall-clock comparison is still unmeasured, so this ticket remains open. These fixes will share the next combined qualification batch.

The missed Flask deletion witness is now reproduced and fixed locally in a63cf22a (not yet released). The regression deletes src/flask/sansio/app.py explicitly, verifies the five original tests/test_cli.py calls are present, and requires all 55 formerly bound register_blueprint references to become unresolved. Published 0.41.45 wrongly rebinds five to Blueprint.register_blueprint; the candidate passes. The generic container-import arm now refuses captured receivers for closed-member profiles: importing a class is not evidence that an unrelated parameter has that class's type. Open trait profiles and uncaptured chains retain existing behavior. A shipped-producer positive/negative fixture verifies constructor-typed receivers still bind, and a simulated schema-90 upgrade discards the persisted wrong decisions. Schema 91 forces that rebuild. Removing the guard makes the regression fail. Local compatibility: 58 member lookup, 5 C# extension safety, 17 capability registry and 15 schema tests pass. Paired published/candidate corpus comparison holds source, package bytes and captured reference populations fixed: Flask 15,365 references, 10 unsupported bindings withdrawn; Django 483,197 references, 52 unsupported bindings withdrawn and 96 same-target decisions use a stronger rule. No new targets. Some withdrawn calls are valid in the source but lack receiver-type proof in the current facts; this is an explicit recall cost, not a claim those calls are invalid. Evidence: /tmp/cosi-046-bind-audit-narrow/{python-flask,py-django}/verification.json and classification.json. The historical quiet-machine wall-clock comparison is still unmeasured, so this ticket remains open. These fixes will share the next combined qualification batch.
Author
Member

Merged in PR #509 (93e46879, qualified source 49edd903): imported containers no longer supply a type for an unrelated captured receiver in closed-member profiles. The deterministic Flask deletion witness checks all 55 affected references and positive import controls. Paired Flask/Django audits produce no new targets, withdrawing 10/52 unsupported bindings; some calls are valid but lack producer receiver proof, so this is an explicit recall cost. Existing parent/name index hints remove the measured lookup-plan regression; all seven tier-1 work ceilings remain unchanged and pass. Final Windows, package, pilot and core workflows are green.

Keeping the historical quiet-machine wall-clock acceptance scope open; this comment does not claim that separate measurement is complete.

Merged in PR #509 (93e46879, qualified source 49edd903): imported containers no longer supply a type for an unrelated captured receiver in closed-member profiles. The deterministic Flask deletion witness checks all 55 affected references and positive import controls. Paired Flask/Django audits produce no new targets, withdrawing 10/52 unsupported bindings; some calls are valid but lack producer receiver proof, so this is an explicit recall cost. Existing parent/name index hints remove the measured lookup-plan regression; all seven tier-1 work ceilings remain unchanged and pass. Final Windows, package, pilot and core workflows are green. Keeping the historical quiet-machine wall-clock acceptance scope open; this comment does not claim that separate measurement is complete.
Author
Member

Triage 2026-11-09: Done except B3, a quiet-machine wall-clock comparison of historical builds, which would not change any decision. The function-local import shape shipped in v0.41.45; the Flask register_blueprint witness is fixed in #509 (93e46879) and pinned in corpus_mutation.rs. Closing.

Triage 2026-11-09: Done except B3, a quiet-machine wall-clock comparison of historical builds, which would not change any decision. The function-local import shape shipped in v0.41.45; the Flask `register_blueprint` witness is fixed in #509 (93e46879) and pinned in `corpus_mutation.rs`. Closing.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
h-dv/code-index#300
No description provided.