Skip to content

Dependency-fidelity: §6 wall caught an unsound input-reachability enrollment on real code (finding + receipt) - #6584

Merged
briansrls merged 8 commits into
mainfrom
session/merry-cat-180
Jul 14, 2026
Merged

briansrls merged 8 commits into
mainfrom
session/merry-cat-180

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

What happened

Attempted the next increment — enroll input-reachability as a live tree-lens that runs over compiled fns (the "whatever is compiled is lens-tested" goal). Building it surfaced a genuine soundness result, so this PR lands the finding, not a gate.

The finding (this is the dependency-fidelity thesis, on our own code)

The enrollment ran unused_parameters over each FnArrowDecl via dependency_lens(decl.output). It was green on synthetic unit tests, but the moment it ran over real compiled fns it flagged false positives — the mature unused_parameters lens flagged its own module.

Root cause: FnArrowDecl = { output: Node, params: List<FnArrowParam> } — output is the return node only; parameters are a separate field. Feeding dependency_lens(decl.output) to a parameter-usage analyzer analyzes the wrong tree. This is §1's keystone lesson recapitulated: synthetic-green lies exactly where a lens is fed the wrong real input; only running over real code exposes it (DESIGN §5/§6 — the reason we treat our own green output as unverified).

What this PR does

  • Does not land the unsound dependency_fidelity_corpus gate (a false-positive gate is worse than none — hard reject by our own review bar).
  • Records the finding + the sound path as a receipt in docs/plans/dependency-fidelity-design.md §11.

Verified along the way

  • The tree-lens-over-compiled-code path is feasible and fast per-module (~236 ms; discrimination/mutation_adequacy scan clean), confirming affected-set-scoped is the right substrate — a whole-corpus sweep WallPricedAborts (~53 min reconcile wedge).
  • Sound next increment: a param-aware full-arrow feed (reconstruct params ∪ body, or a full-arrow-node accessor) so the analyzer sees declarations and uses. No existing corpus driver of unused_parameters exists to copy.

briansrls and others added 8 commits July 14, 2026 02:06
Reviewer (claude-opus-4-7 APPROVE) flagged FidelitySurface as declared with
no producer/consumer — speculative dead scaffold (DESIGN §5 wall-now / §2 don't
grow concepts ahead of a consumer). The §3 surface is already implicit in the
FidelityDiscrepancy variant (input/output/interaction), and the design doc holds
the three-surface concept, so the enum earned no place yet. Reintroduce with a
consumer when the output-reachability / interaction arms land. Witnesses still
green (clean_input_surface_is_faithful, one_unused_param_flips_to_discrepant).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…imitive

The coverage side of the §7 engine. Coverage of a relationship R = the witness
set such that every one-step mutation of R's declared structure is KILLED. This
lands the adequacy verdict grounded on v2.lens.discrimination's authority for
"killed" (a mutation's discriminating_unit is killed iff unit_is_discriminating
holds — a green plus a perturbed red), so "killed" is not re-minted (§3). A
surviving mutation is a located coverage hole (Inadequate{survivors}).

Mutation enumeration from a declared structure (DependencyView one-step
neighbors) is the staged producer this verdict feeds (§4/§7).

Green by execution (local claim_batch):
- adequate_when_every_mutation_has_a_discriminating_witness — real discriminating
  unit (green CompilesClaim + perturbed-input red DiagnosticClaim) → PASS
- surviving_mutation_is_inadequate — non-discriminating Empty unit → survivor → PASS
A discriminating pair exercising the real unit_is_discriminating grounding both
directions. inert-lens hygiene green (module reached by its witness).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ecord the finding

Attempted to enroll input-reachability as a live tree-lens over the corpus
(run unused_parameters over each FnArrowDecl). It was green on synthetic tests
but flagged FALSE POSITIVES the moment it ran over real compiled fns — the
mature unused_parameters lens flagged its own module. Root cause: FnArrowDecl is
{ output: Node, params: List<FnArrowParam> } — output is the return node only;
params are a separate field. Feeding dependency_lens(decl.output) to a parameter
analyzer analyzes the wrong tree. This is the §1 keystone lesson on our own code:
synthetic-green lies where a lens is fed the wrong real input; only running over
real code exposes it (DESIGN §5/§6).

Removed the unsound v2.lens.dependency_fidelity_corpus (never landed a gate that
false-positives). Recorded the finding + the sound path (param-aware full-arrow
feed; per-module run is fast at ~236ms, whole-corpus is WallPricedAbort so the
subject must be affected-set-scoped) as a receipt in the design doc §11.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gunbai-bot gunbai-bot Bot changed the title dependency fidelity Dependency-fidelity: §6 wall caught an unsound input-reachability enrollment on real code (finding + receipt) Jul 14, 2026
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review July 14, 2026 06:26
@briansrls
briansrls merged commit bd899c8 into main Jul 14, 2026
3 of 6 checks passed
@briansrls
briansrls deleted the session/merry-cat-180 branch July 14, 2026 06:37
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