Skip to content

resolution divergence census slice 2 (read-only telemetry) - #6967

Merged
briansrls merged 8 commits into
mainfrom
session/still-hawk-65
Jul 21, 2026
Merged

briansrls merged 8 commits into
mainfrom
session/still-hawk-65

Conversation

@briansrls

@briansrls briansrls commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Read-only follow-on to #6936 (resolution_divergence_census): instruments the actual silent-pick arms (not diagnostics) and adds additive telemetry the operator needs to gate backstop widening, codemod coverage, and root-prelude decisions.

  • Objective 1 — silent picks: thread-local hooks on global_bare_lookup LCP strict-winner (type/data) and lookup_resolved_sig first-hit over func_env.parents (fn); counts + site lists emitted separately per class.
  • Objective 2 — census tags: ContainmentResolveVia on non-agree rows; owner-module cross-check on agree+global_unique; neither_bound subclassing (builtin_or_intrinsic / local_or_param / genuinely_unbound).
  • Objective 3 — import_unresolved cross-check: containment walk binding vs infer-at-site (lookup_binding_by_name / global_bare_callable_node); mismatch rows listed.

No resolver policy flips; telemetry only.

Test plan

  • cargo fmt --all --check
  • cargo build -p v1-compiler --bin resolution_divergence_census
  • cargo test -p v1-compiler resolution_divergence_positive_control -- --nocapture (pass)
  • CI floor (build + ci jobs on push)

@gunbai-bot
gunbai-bot Bot force-pushed the session/still-hawk-65 branch from b34b2a3 to 0ec158d Compare July 21, 2026 03:10
@gunbai-bot gunbai-bot Bot changed the title Census slice 2 resolution divergence census slice 2 (read-only telemetry) Jul 21, 2026
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review July 21, 2026 03:20
@cursor

cursor Bot commented Jul 21, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

…hecks

Read-only follow-on to #6936: instrument global_bare LCP and
lookup_resolved_sig first-hit arms (thread-local, enable/disable bracket),
add ContainmentResolveVia / neither_bound subclass tags, and
import_unresolved walk-vs-infer cross-check rows. Single-pass parent scan
for fn silent-pick recording (review 40548).

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot
gunbai-bot Bot force-pushed the session/still-hawk-65 branch from 44fc7f4 to 2cb8d97 Compare July 21, 2026 03:34
@gunbai-bot

gunbai-bot Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Addressed the non-blocking notes from review 40548 in 2cb8d97658:

  1. Single-pass parent scan — lookup_resolved_sig now folds env.parents once (ParentSigScan) to capture first-hit sig, match count, and chosen parent for fn silent-pick telemetry (was three walks when telemetry was enabled).
  2. Commit subject — squashed the WIP: commits into one titled resolution divergence census slice 2: silent-pick telemetry + cross-checks.

— sent from still-hawk-65

@gunbai-bot

gunbai-bot Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Verified review 40557 against 2cb8d97658 — no code changes needed; the approval matches the tree:

  • Hooks are gated by resolution_silent_pick_telemetry::enable() / disable() around whole_tree_resolved_ctx in resolution_divergence_census_live; outside that bracket is_enabled() is false and the infer arms are inert.
  • Census cross-check uses existing symbols: global_bare_nearest_ancestor_candidate (env hook + cli_run import-unresolved path), global_bare_callable_node, lookup_binding_by_name, infer_builtin_call_type.
  • Diff is v1 seed hand-Rust only (5 files, no .dag edits): cli_run.rs, resolution_silent_pick_telemetry.rs, lib.rs mod line, v1_compiler_infer_env.rs, v1_compiler_infer_sigs.rs.

— sent from still-hawk-65

@gunbai-bot

gunbai-bot Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Addressed review 40558 in the latest commit: lookup_resolved_sig again short-circuits on the first matching parent when resolution_silent_pick_telemetry::is_enabled() is false (normal typecheck/inference). The full ParentSigScan fold — counting all parent matches for fn silent-pick telemetry — runs only behind the census enable()/disable() bracket in resolution_divergence_census_live.

— sent from still-hawk-65

…hecks

Read-only follow-on to #6936: instrument global_bare LCP and
lookup_resolved_sig first-hit arms (thread-local, enable/disable bracket),
add ContainmentResolveVia / neither_bound subclass tags, and
import_unresolved walk-vs-infer cross-check rows.

Review 40558: restore first-hit short-circuit in lookup_resolved_sig when
telemetry is off; full ParentSigScan only inside the census bracket.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot
gunbai-bot Bot force-pushed the session/still-hawk-65 branch from 03c3aa0 to 97fa8b2 Compare July 21, 2026 03:50
@gunbai-bot

gunbai-bot Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Verified reviews 40571 and 40572 against tip 97fa8b2b45 — no further code changes required:

  • 40571 (composer-2.5 APPROVE): Confirmed thread-local gating (enable/disable only in resolution_divergence_census_live); lookup_resolved_sig short-circuits on first parent hit when is_enabled() is false, full ParentSigScan only when telemetry is on; global_bare_lookup LCP hooks match first-hit semantics.
  • 40572 (claude-opus-4-7 APPROVE): Confirmed v1 stage0-only diff, no .dag/substrate changes, telemetry arms gated by is_enabled().

Prior REQUEST_CHANGES (review 40558) addressed in the same tip via the is_enabled() branch split.

— sent from still-hawk-65

@gunbai-bot

gunbai-bot Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Verified reviews 40611 (claude-opus-4-7) and 40612 (composer-2.5) against tip 7344be121b — no code changes; both approvals match the tree:

  • 40611 (runtime/intrinsic wiring): 04_method.dag + emit.dag register the three resolution_silent_pick_* intrinsics; hooks live in 04_env.dag / 04_sigs.dag and emit to v1_rt:: via regen. lookup_resolved_sig_with_telemetry keeps first-hit semantics (acc.sig != none guard at 04_sigs.dag:75); disabled path is the original short-circuit fold (04_sigs.dag:104-108). runtime_rust.dag uses the text_lookup_work_counter thread-local pattern; Cell/RefCell are imported once at module scope (duplicate cfg import removed in 7344be121b).
  • 40612 (census gating): resolution_divergence_census_live brackets whole_tree_resolved_ctx with v1_rt::resolution_silent_pick_enable/disable(); telemetry is inert outside that bracket. Additive census buckets/cross-checks unchanged from slice-2 mandate.

Local gates on 7344be121b: cargo fmt --check green, regen_stage0 --verify green (regen_divergence_count=0). CI: build pass; ci still running on this tip.

— sent from still-hawk-65

@gunbai-bot

gunbai-bot Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Verified reviews 40617 (composer-2.5) and 40618 (claude-opus-4-7) against tip e89e306573 — no code changes required; both findings hold.

40617 (telemetry gating / read-only scope): resolution_divergence_census_live is the sole enable site (cli_run.rs:18050), with disable before error propagation (:18056). Production lookup_resolved_sig keeps the original short-circuit parent fold when telemetry is off (04_sigs.dag:101-109); hooks only run under resolution_silent_pick_is_enabled(). Census buckets/cross-checks remain observation-only.

40618 (runtime emission / inert recorders): Thread-local flag defaults false (v1_rt.rs:102-114); recorders early-return on !enabled or count < 2. Runtime surface is emitted from runtime_rust.dag, not hand-authored compiler tree.

Exclusion rows (ci_layer_roots.dag:235-265): Per-file additions for strict-resolve-red scaffold modules follow the existing whole_tree_strict_resolve_scaffold_exclusion_note pattern (single authority, probe/census consumers only). Census binary already projects via whole_tree_resolve_exclusion_substrings() (resolution_divergence_census.rs:40); no census-local parallel list.

Merge readiness: ≥4 APPROVEs, no open REQUEST_CHANGES, mergeable=CLEAN; awaiting ci job green.

— sent from still-hawk-65

briansrls pushed a commit that referenced this pull request Jul 21, 2026
Per operator ruling 2026-07-21, whole_tree_strict_resolve_exclusion_substrings
rows land in still-hawk #6967 only; this lane applies them locally uncommitted
for census unblock.

Co-authored-by: Cursor <cursoragent@cursor.com>
The 12 per-file rows caused importer-missing cascade (live hubs like
00_compile import excluded scaffolds). Census unblock uses slice-1's
ephemeral --exclude-subpath CLI layer (83-module closure), not authority
rows — comparability with #6936 denominator preserved.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot

gunbai-bot Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Verified reviews 40635 (composer-2.5) and 40636 (claude-opus-4-7) against tip 4efb7086d2 — no code changes required; both APPROVE findings hold.

40635: Telemetry gated off by default; resolution_divergence_census_live is the sole enable site; first-hit/LCP semantics preserved when disabled (04_sigs.dag:101-109). Slice-2 census buckets (neither-bound subclass, import-unresolved infer cross-check, agree-global-unique owner rows) are observation-only. Partial whole_tree_strict_resolve exclusion revert (4efb7086d2) keeps census unblock on ephemeral CLI excludes, not authority bake.

40636: Thread-local recorders no-op when disabled; lookup_resolved_sig_with_telemetry parallel fold noted as non-blocking drift risk — agreed, collapse candidate when census lane closes.

Census receipt (slice-2 counts): stern-newt 83-row CLI set, 0 extra iterations, exit 0. Universe 1187/1103, sites 41052, diverge 0, agree 38401, containment_ambiguous 53, import_unresolved 1463, neither_bound 1135. Silent-pick: global_bare_lcp=3268, global_bare_lcp_tie=3642, fn_parent_first_hit=15. Full output: target/census-receipts/slice2-census-receipt.txt.

— sent from still-hawk-65

@briansrls
briansrls merged commit 9c57540 into main Jul 21, 2026
3 checks passed
@briansrls
briansrls deleted the session/still-hawk-65 branch July 21, 2026 09:35
briansrls added a commit that referenced this pull request Jul 22, 2026
* WIP: Wire #6967 silent-pick telemetry to fail-closed CI gate

* WIP: Wire #6967 silent-pick telemetry to fail-closed CI gate

* WIP: Wire #6967 silent-pick telemetry to fail-closed CI gate

* WIP: Wire #6967 silent-pick telemetry to fail-closed CI gate

* WIP: Wire #6967 silent-pick telemetry to fail-closed CI gate

* WIP: Wire #6967 silent-pick telemetry to fail-closed CI gate

* WIP: Wire #6967 silent-pick telemetry to fail-closed CI gate

* WIP: Wire #6967 silent-pick telemetry to fail-closed CI gate

* WIP: Wire #6967 silent-pick telemetry to fail-closed CI gate

* WIP: Wire #6967 silent-pick telemetry to fail-closed CI gate

* WIP: Wire #6967 silent-pick telemetry to fail-closed CI gate

* Fix silent-pick note/comment overclaiming single-authority (review 41032)

falsifier_silent_pick_gate_note said the nightly gate refuses on "ANY
nonzero count" — the actual gate (resolution_divergence_silent_pick_refusal)
joins against containment_ambiguous_rows/diverge_rows and refuses only on
genuine picks, filtering ~487 benign whole-pool-overlap sites. A reader
following the note as written would implement a raw-count gate.

main.rs's compile-path gate is a separate, narrower proxy (raw
fn_parent_first_hit count only, global_bare_lcp skipped) — not the shared
authority the note implied. Corrected both to name the asymmetry directly:
over-strict on fn_parent_first_hit (asserted, not construction-proven,
corpus invariant), under-strict on global_bare_lcp (deferred to the nightly
full-join backstop). No behavior change — doc/comment accuracy only; the
structural single-authority gap is a tracked fast-follow.

* Fix silent-pick diagnostic accuracy + register unwired crosscheck bin (review 41047)

Three findings, all valid:

1. resolution_divergence_census.rs's success message hardcoded "0 silent
   picks" even when raw telemetry was nonzero and only filtered-as-benign
   by the containment_ambiguous/diverge join — misleading on a genuinely
   clean-but-noisy corpus. Now reports genuine=0 explicitly alongside the
   raw filtered count.

2. main.rs's compile-path proxy gate labeled its raw fn_parent_first_hit
   count "genuine" — the join-filtered authority's own term. Commit
   2167251 fixed the same overclaim in comments/notes but missed this
   stderr line. Reworded to name it as the raw-count proxy it is.

3. src/bin/silent_pick_crosscheck.rs had no [[bin]] entry in Cargo.toml —
   spec-without-execution, unreachable via cargo run. Registered with a
   scaffold marker + dissolution trigger matching this file's own
   lifecycle (falsifier_silent_pick_gate telemetry class).

* WIP: Wire #6967 silent-pick telemetry to fail-closed CI gate

* WIP: Wire #6967 silent-pick telemetry to fail-closed CI gate

* WIP: Wire #6967 silent-pick telemetry to fail-closed CI gate

* Fix cargo fmt drift in ws-param cleanup (CI fmt gate)

The harness's auto-WIP commit dropped the dead `ws: &Path` parameter
but didn't run cargo fmt, so the signature/call-site reflow was still
pending — CI's fmt-check gate caught it.

---------

Co-authored-by: Brian Searls <briansearls1@gmail.com>
Co-authored-by: gunbai-bot[bot] <289086189+gunbai-bot[bot]@users.noreply.github.com>
gunbai-bot Bot pushed a commit that referenced this pull request Jul 22, 2026
Per operator ruling 2026-07-21, whole_tree_strict_resolve_exclusion_substrings
rows land in still-hawk #6967 only; this lane applies them locally uncommitted
for census unblock.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request Jul 22, 2026
…#6968)

* WIP: §10 step 1

* WIP: §10 step 1

* §10 step 1 commit 1: namespace_graft std carrier + witnesses

Land v2.std.namespace_graft (complement-based body collection, graft spine,
provenance-only ModuleShell) with discriminating witnesses: QN round-trip,
zero-metadata-edge audit, empty-QN RED, dual-header+brace RED, and marker-strip
fill equivalence (strip ^dag_surface_module → identical SymbolIndex fill).

Co-authored-by: Cursor <cursoragent@cursor.com>

* WIP: §10 step 1

* WIP: §10 step 1

* WIP: §10 step 1

* WIP: §10 step 1

* WIP: §10 step 1

* WIP: §10 step 1

* WIP: §10 step 1

* fix(ci): move normalize graft witnesses to long lane (5s budget)

Pipeline tokenize→parse→normalize tests exceeded per-PR discovery
eval budget; relocate to test/claim/long/ and rename helpers to avoid
test-fn name recursion.

Co-authored-by: Cursor <cursoragent@cursor.com>

* WIP: §10 step 1

* revert: drop exclusion rows from #6968 — still-hawk owns #6967

Per operator ruling 2026-07-21, whole_tree_strict_resolve_exclusion_substrings
rows land in still-hawk #6967 only; this lane applies them locally uncommitted
for census unblock.

Co-authored-by: Cursor <cursoragent@cursor.com>

* WIP: §10 step 1

* Revert "WIP: §10 step 1"

This reverts commit 7964774.

* WIP: §10 step 1

* WIP: §10 step 1

* WIP: §10 step 1

* Pin recovered-83 census exclude set for cross-lane oracle witness.

Git-readable copies of census_extra_excludes.txt and still-hawk-row-coordination
for fierce-heron-512 derived(tip)==recovered-83 acceptance; ephemeral CLI only,
no ci_layer_roots authority bake.

Co-authored-by: Cursor <cursoragent@cursor.com>

* WIP: §10 step 1

* WIP: §10 step 1

* WIP: §10 step 1

* WIP: §10 step 1

* ci: retry floor after srv3-05 OOM (exit 137).

Run 29837577381 died during batch-2 discovery resolve at ~31GiB RSS
on srv3-05 with no witness failures (batch-1 compile-clean green).
Witness fixes through ded3037 verified locally.

Co-authored-by: Cursor <cursoragent@cursor.com>

* WIP: §10 step 1

* Fix doc-graph orphan: bind emitter residual probe map into reachability roots.

docs/probes/emitter_residual_site_map_2026-07-21.md landed via main merge
without a bind: or inbound link, failing doc_graph_has_no_orphan_docs in batch 2.
Follow curated_cargo_frontier_probe_report precedent in self_host_curated_probe_cargo.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Revert "Fix doc-graph orphan: bind emitter residual probe map into reachability roots."

This reverts commit a561dcd.

* Address review 41136: body-boundary marker stops spine QN inflation.

Single-decl modules whose lone top-level declaration targets a Conj could
add an extra QN segment because the spine walker could not distinguish
module-path wraps from body content. Graft now wraps the body conj with
a ^namespace_graft_body_boundary marker; the spine reader and export
collection stop there. Adds single-decl conj-body round-trip witness and
pins std↔extdeps scaffold dissolution to the namespace-resolution terminal.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fold edge-disposition census to single authority (review 41162).

Delete name-only namespace_graft_module_root_edge_disposition; zero_metadata
witness now pins production namespace_graft_collect_edge_disposition(edge).

Co-authored-by: Cursor <cursoragent@cursor.com>

* WIP: §10 step 1

* Produce ModuleRootEdgeRehomeProvenance for identity projection edges.

Review 41294: the census coproduct arm was declared but unreachable because
grammar_production_identity_node_projection fell through to TransparentDescent.
Pin the RE-HOME disposition in namespace_graft_collect_edge_disposition and
update zero_metadata_test expectation.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Brian Searls <briansearls1@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: gunbai-bot[bot] <289086189+gunbai-bot[bot]@users.noreply.github.com>
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