Skip to content

trace_mark: stage-boundary gantt marks through the v1 compile pipeline - #6298

Merged
briansrls merged 4 commits into
mainfrom
session/lively-raven-355
Jul 5, 2026
Merged

briansrls merged 4 commits into
mainfrom
session/lively-raven-355

Conversation

@gunbai-bot

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

Copy link
Copy Markdown
Contributor

Summary

One new registry intrinsic — trace_mark(label) -> Unit — and nine marks at the known segment boundaries of the v1 compile pipeline, so every run log carries a natural Gantt:

[gantt] compile.frontend.begin t_ms=0 rss_mib=15
[gantt] compile.frontend.done t_ms=21595 rss_mib=277
[gantt] compile.normalize.done t_ms=21792 rss_mib=277
[gantt] compile.reconcile.done t_ms=...
[gantt] compile.emit.dag.collect.done t_ms=...

(real output from the first instrumented whole-tree run, live on this branch's worktree). Consecutive marks define the segments; rss_mib rides along for the memory curve. Labels are dot-hierarchical so deeper levels can join the same log grammar later (floor batches → gate subprocesses → compile stages — the fractal-gantt direction).

Motivation (operator request, 2026-07-05): the whole-tree compile runs 60+ minutes single-threaded with zero output after resolved N sources; every non-docs CI run since 07-04 has died inside that silence at the step timeout. Checkpoints make the wall attributable at a glance from any CI log.

Mechanism — the record_source_chars_index_lookup precedent, end-to-end:

  • registry row in 04_method.dag (+ hand-synced twin v1_compiler_infer_method.rs)
  • realization authored in runtime_rust.dag (+ hand-synced v1_rt.rs)
  • interpreter arm in v1_interpreter.rs for totality
  • 9 call sites in compile.dag (+ hand-synced v1_compiler_compile.rs)

Honesty notes: this is a marked bridge — an effectful intrinsic reachable from pipeline code. It is the v1-seed interim realization of the v2 per-RealizedStep CostAccount (std.realization_measurement); it dissolves into that carrier when inhabited. Authority .dag edits land with hand-synced generated seed per the #5867 precedent because regen is currently blocked on main (#6291) — re-verify at the next regen window.

Worker attestation

  • Title describes the change.
  • PR body summarises what and why.
  • Tests run: ctrl-build --local -- cargo build -p v1-compiler --release --features text_lookup_work_counter --bins (green, 1m31s), cargo clippy -p v1-compiler --release -- -D warnings (green), cargo fmt applied. §5 verification by execution: instrumented whole-tree compile is emitting the marks shown above.
  • No surprise commits; no secrets/binaries staged.

🤖 Generated with Claude Code

briansrls and others added 2 commits July 5, 2026 20:28
One new registry intrinsic trace_mark(label) -> Unit (the
record_source_chars_index_lookup precedent: registry row in 04_method.dag,
realization in runtime_rust.dag -> v1_rt, interpreter arm for totality).
Nine marks at the known segment boundaries of the compile pipeline
(frontend/normalize/reconcile/analyses/emit begin+done, dag collect/serialize),
so every run log carries a natural Gantt:

  [gantt] compile.reconcile.done t_ms=... rss_mib=...

Consecutive marks define the segments; rss_mib rides along for the memory
curve. Motivation: the whole-tree compile runs >60 min single-threaded with
zero output after "resolved N sources" — CI runs die inside it blind
(operator request 2026-07-05: checkpoints + a general logging system).

Marked bridge, interim by design: dissolves into the v2 per-RealizedStep
CostAccount (std.realization_measurement) when the realization-measurement
carrier is inhabited. Authority edits (.dag) land with hand-synced generated
seed (.rs) per the #5867 precedent — regen is currently blocked on main
(#6291); re-verify at the next regen window.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@gunbai-bot gunbai-bot Bot changed the title ci timeout investigation trace_mark: stage-boundary gantt marks through the v1 compile pipeline Jul 5, 2026
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review July 5, 2026 20:43
@briansrls
briansrls merged commit 8e9dbfc into main Jul 5, 2026
1 of 2 checks passed
@briansrls
briansrls deleted the session/lively-raven-355 branch July 5, 2026 21:29
gunbai-bot Bot pushed a commit that referenced this pull request Jul 5, 2026
gunbai-bot Bot pushed a commit that referenced this pull request Jul 5, 2026
gunbai-bot Bot pushed a commit that referenced this pull request Jul 5, 2026
briansrls added a commit that referenced this pull request Jul 6, 2026
…d by broken regen); keep source_root_ingest V2Tree fix

The #6289 witness ownership_movable_test.dag emits test_claim_ownership_movable.rs,
which references v1.compiler.ownership symbols (merge_branch_licenses, MoveLicenseAccum,
LiveState, move_site_key, ...) that are NOT in the committed v1_compiler_ownership.rs
seed. Registering it as a GENERATED file therefore breaks the seed crate's compile
(E0432/E0425/E0061) -- 'just register it' cannot land in isolation.

Measured blast radius: the fresh self-compile drifts from the committed seed across
33 files (the known-broken regen, emitter bugs #6298), so pulling in the fresh
v1_compiler_ownership.rs cascades into the whole regen. Not a scoped fix; parked for
the regen project (or exclude the off-auto-path witness from the emit closure).

KEPT: the source_root_ingest_gate_passes main-red fix -- emit_source_root_ingest_manifest
now imports v2.std.cross_tree.import_model { DagTree, V2Tree }. The manifest emitter
hardcodes its import block and missed this when source_root became a grounded
SourceRootRef (#5473/#5486), so every witness importing the manifest failed with
'undefined variable V2Tree'. Verified locally: all 3 real_ingest witnesses + the 2
runnable closure witnesses now return true (were compile errors).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
briansrls added a commit that referenced this pull request Jul 6, 2026
…nert-gate hole #1) (#6311)

* WIP: Fork of realization

* WIP: Fork of realization

* WIP: Fork of realization

* WIP: Fork of realization

* Floor affected-set: non-.dag-only diff is structural-∅, not ignorance (unblock pure-.rs PRs)

floor_diff_edits_from_line_ranges refused (Err) when a diff changed only
non-.dag files (saw_non_dag && !saw_dag) — reddening the discovery-corpus
batch for every pure-.rs PR (seed hand-syncs, Rust-only changes). That
conflated a structural-∅ .dag frontier with an ignorance state.

Per the operator's arity ruling: a successful git-diff observation whose
.dag subset is empty is NOMINAL (present, empty) — the SAME outcome as an
empty diff (every row takes the not-affected skip). The only ignorance
state is a FAILED observation (UnifiedDiffFail, floor_diff_observe.dag),
refused upstream in floor_git_diff_range. This mirrors the function's own
departed-.dag-path arm, which already distinguishes structural-∅ (continue)
from ignorance (refuse).

Fix: drop the saw_non_dag/saw_dag refusal; a non-.dag-only diff falls
through to the empty frontier. Observation layer (Ok/Fail + exit code) and
the shell docs-only shortcut are unchanged (already correct / downstream-
safe). Red control: non_dag_only_diff_is_structural_empty_frontier_not_refusal
(was Err, now Ok empty).

Also fixes the compile error at 32fac2e (auto-commit captured this edit
mid-flight: declarations removed, refusal block not yet dropped).

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

* WIP: Fork of realization

* Revert roster registration of test_claim_ownership_movable.rs (blocked by broken regen); keep source_root_ingest V2Tree fix

The #6289 witness ownership_movable_test.dag emits test_claim_ownership_movable.rs,
which references v1.compiler.ownership symbols (merge_branch_licenses, MoveLicenseAccum,
LiveState, move_site_key, ...) that are NOT in the committed v1_compiler_ownership.rs
seed. Registering it as a GENERATED file therefore breaks the seed crate's compile
(E0432/E0425/E0061) -- 'just register it' cannot land in isolation.

Measured blast radius: the fresh self-compile drifts from the committed seed across
33 files (the known-broken regen, emitter bugs #6298), so pulling in the fresh
v1_compiler_ownership.rs cascades into the whole regen. Not a scoped fix; parked for
the regen project (or exclude the off-auto-path witness from the emit closure).

KEPT: the source_root_ingest_gate_passes main-red fix -- emit_source_root_ingest_manifest
now imports v2.std.cross_tree.import_model { DagTree, V2Tree }. The manifest emitter
hardcodes its import block and missed this when source_root became a grounded
SourceRootRef (#5473/#5486), so every witness importing the manifest failed with
'undefined variable V2Tree'. Verified locally: all 3 real_ingest witnesses + the 2
runnable closure witnesses now return true (were compile errors).

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

* Red-control test for source_root_ingest manifest cross_tree import

manifest_imports_grounded_source_root_constructors: asserts the emitted manifest
imports v2.std.cross_tree.import_model whenever it emits a grounded source_root
value -- deleting the import line reddens this test (paired with the CI witness
program_assembly_real_ingest_module_roots_parse_holds as the execution oracle).

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

* Resolve merge with main #6269 in floor_diff_edits + manifest emitter

The auto-committer flushed the in-progress merge with conflict markers (0b74fe4);
this resolves both:

- floor_diff_edits_from_line_ranges: keep #6269's v1_attribution_index + added_paths
  handling; keep the structural-∅ fix (no saw_non_dag/saw_dag refusal -- a non-.dag-only
  diff is a nominal empty frontier). The two are orthogonal and compose.
- emit_source_root_ingest_manifest: take #6269's emit_source_root_ref_import (derives
  the referenced SourceRootRef constructors from records) over the earlier hardcoded
  both-constructors line -- same source_root_ingest V2Tree fix, more precise form.

Kept both red-control tests; retargeted the structural-∅ test off a src/v1/ path
(which #6269 now eagerly resolves via the real workspace tree, unavailable from the
unit-test cwd) onto a path-agnostic non-.dag path. Both green.

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

* WIP: regen

* WIP: regen

* Revert inert selective-import filter (ancestry bypasses type_env_for_import)

The type_env_for_import specific_names filter was auto-committed to this PR
but is a no-op: lookup_binding_by_name reads ancestry_str_bindings, which
build_type_env fills from union_parent_type_env_caches (04_infer.dag:5507)
and the single-import path (:133) -- both merge each import's full
parent.type_env_cache, bypassing type_env_for_import (which only feeds the
unused 'parents' field). Measured: dag_collect still resolves un-imported
ErrorNode with the filter built in. Reverting so #6311 does not carry a
fail-closed illusion; the real fix belongs in the ancestry-cache seam.

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

---------

Co-authored-by: Brian Searls <briansrls@gunb.ai>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.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