Skip to content

Wiring-liveness lens wave 1: reachability kernel + wired floor witness - #5679

Merged
briansrls merged 7 commits into
mainfrom
session/nimble-ibex-318
Jun 24, 2026
Merged

briansrls merged 7 commits into
mainfrom
session/nimble-ibex-318

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Jun 23, 2026 •

Copy link
Copy Markdown
Contributor

Wave 1 of the wiring-liveness oracle (ROADMAP §4; authority = the merged plan carrier dsl/gunbc/plans/wiring_liveness_preflight.dag, #5664). The spine: the input→output dependence kernel + a fail-closed floor witness, proven green-by-execution and red-on-perturbation.

The principle

Wiring-liveness is the cache-purity perturbation oracle read backwards:

  • purity (caching): same input ⇒ same output — a declared input absent from the cache key is impure.
  • liveness (wiring): different input ⇒ different output — a declared input with no structural path to the output it feeds is a dead wire.

One kernel, two readings (DESIGN §2-horizontal). Reuses std.dependency DependencyView/dependency_lens as the dependence carrier — no new dependence type minted. Distinct from unused_parameters: that asks referenced ≥1×; this asks transitive path to an output (RED when an input is referenced only inside structure that itself never reaches the output).

What landed

  • v2.lens.wiring_liveness — forward transitive reachability over the DependencyView graph; WiringRelation / WiringVerdict = Wired | Unwired verdict carrier.
  • src/v2/lens/wiring_liveness_test.dag — three positive test fns (true-when-correct, red-on-revert), floor-discovered like the landed inert_carrier_test.dag:
    • wiring_liveness_wired_input_reaches_output — wired synthetic tree (via real dependency_lens) ⇒ Wired. Proven RED when the subject wire is cut.
    • wiring_liveness_dead_input_is_unwired — a declared input disconnected from the output ⇒ Unwired. Proven RED when the lens goes lenient-always-Wired (no fabricated-green).
    • wiring_liveness_real_reflected_type_field_reachable — real-corpus: reflects a live type via resolve_type_node and runs the same kernel over its real dependence graph.

Discrimination (the operator's explicit ask — verified by execution)

perturbation test that goes RED
subject wire cut (input no longer reaches output) …wired_input_reaches_output → false
lens made lenient (always Wired) …dead_input_is_unwired → false (wired test stays green = control)

The two positive tests pin the kernel from both sides.

Honest boundary (DESIGN §5/§6 — stated in the lens construction_justification)

This is the compile-time wall and covers only .dag-modeled / reflectable structure. The motivating GCP IAM auth_input bug lives in the Rust-seed resolve_auth realization — opaque to compile-time reflection = the wave-2 opaque-realization witness, not this slice. The corpus also has no fn/arrow/service-operation reflection (resolve_type_node + concept_decl_facts_live yield only ItemKind::TypeItem), so wiring_liveness_real_reflected_type_field_reachable is a real-DATA kernel smoke over type-dependence (proves the kernel runs on live reflected structure, not inert), not "covers real wiring bugs." WIDEN trigger: realization self-host (§5/§7) + gunbc#5364 (.dag fn reflection) — the lens widens to real fn/operation corpus coverage when fn reflection lands.

🤖 Generated with Claude Code

briansrls and others added 3 commits June 23, 2026 21:27
Wiring-liveness = the cache-purity perturbation oracle read backwards
(purity: same-in same-out; liveness: different-in different-out -- a
declared input with no structural path to the output it feeds is a dead
wire). Reuses std.dependency DependencyView/dependency_lens as the
dependence carrier (no new dependence type minted). Distinct from
unused_parameters: that asks referenced->=1x; this asks transitive-path-
to-output (RED when an input is referenced only inside structure that
itself never reaches the output).

v2.lens.wiring_liveness: forward transitive reachability over the
DependencyView graph; WiringRelation/WiringVerdict verdict carrier.

Floor witnesses (src/v2/lens/wiring_liveness_test.dag), all POSITIVE
test fns, green-by-execution + proven red-on-perturbation:
  - wiring_liveness_wired_input_reaches_output  (RED if the subject wire is cut)
  - wiring_liveness_dead_input_is_unwired        (RED if the lens goes lenient-always-Wired)
  - wiring_liveness_real_reflected_type_field_reachable
      (real-DATA kernel smoke over a resolve_type_node-reflected corpus
       type's live dependence graph -- the only real-corpus structure
       reflectable today)

Honest boundary (in the construction_justification): this COMPILE-TIME
wall covers only .dag-modeled / reflectable structure. The motivating
GCP IAM auth_input bug lives in the Rust-seed resolve_auth realization,
opaque to compile-time reflection = wave-2 opaque-realization witness.
The corpus has NO fn/arrow/service-operation reflection
(resolve_type_node + concept_decl_facts_live yield only TypeItem), so a
corpus-wide scan of real fn params / service ops is also opaque today.
WIDEN trigger: realization self-host + gunbc#5364 (.dag fn reflection).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review June 23, 2026 21:36
@gunbai-bot gunbai-bot Bot changed the title Wiring-liveness lens wave 1: dependence carrier + wired floor witness Wiring-liveness lens wave 1: reachability kernel + wired floor witness Jun 23, 2026
briansrls added a commit that referenced this pull request Jun 23, 2026
@gunbai-bot gunbai-bot Bot mentioned this pull request Jun 23, 2026
6 tasks
…onvergence early-exit

Addresses #5679 review (claude-opus-4-7, non-blocking):
 - Drop WiringVerdict = Wired | Unwired + wiring_verdict_is_wired: a
   2-variant coproduct isomorphic to Bool carrying nothing Bool doesn't
   (predicate dissolution / DESIGN section 2). wiring_relation_is_wired
   returns Bool directly. WiringRelation (3-field dependence bundle) stays
   -- not Bool-isomorphic. A richer verdict re-enters when the plan's
   declared-inert-vs-dead-wire 3rd state actually lands (model just-in-time).
 - wiring_reach_saturate now folds a WiringReachState { reached, stable }
   with a convergence early-exit (stop when the reached set stops growing),
   faithfully mirroring the affected_set closure fixpoint it was modeled on.

Re-verified by execution (claim_batch): all 3 witnesses green; two-sided
pin intact (lenient lens => dead-input RED; strict lens => wired RED).

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

gunbai-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

Thanks — both findings addressed in 9174fb7 (both valid, both fixed):

  1. WiringVerdict Bool-isomorphic — flattened. Dropped WiringVerdict = Wired | Unwired + wiring_verdict_is_wired; wiring_relation_is_wired now returns Bool directly. Kept WiringRelation (3-field dependence bundle, not Bool-isomorphic). A richer verdict re-enters when the plan's declared-inert vs dead-wire 3rd state actually lands (model just-in-time, so it carries info Bool can't at that point) — flattening now avoids the clone-the-wrapper risk you flagged.
  2. No convergence early-exit — added. wiring_reach_saturate now folds a WiringReachState { reached, stable } with a stop-when-the-reached-set-stops-growing short-circuit, faithfully mirroring the affected_set closure fixpoint it was modeled on (which I'd cited but hadn't fully reused). Worst-case is still inherent to list-based reachability, but it no longer runs dead passes after convergence.

Re-verified by execution (claim_batch): all 3 witnesses green; two-sided discriminating pin intact (lenient lens ⇒ dead-input RED; strict lens ⇒ wired RED).

— sent from nimble-ibex-318

briansrls and others added 3 commits June 23, 2026 23:14
…ty anchor name

#5663 added dsl/extdeps/ctrl/jobserver.dag with its ExternalAuthority anchor
declared as `ctrl_jobserver_authority` instead of the single-authority canonical
name `extdeps_external_authority_anchor` that all 189 other extdeps modules use
and that read_external_authority_anchor_from_items() keys on. The lens therefore
projected the anchor as Absent → live_anchored_modules_clean RED fleet-wide
(a §3 nicknaming of the anchor decl). Rename to the canonical name; no other
references. Verified by execution: corpus_live_anchored_modules_clean_holds,
corpus_live_clean_tree_holds, and extdeps_external_authority_gate_passes all
flip false→true with this one-line rename.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@briansrls
briansrls merged commit 84345df into main Jun 24, 2026
2 checks passed
@briansrls
briansrls deleted the session/nimble-ibex-318 branch June 24, 2026 02:51
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