Skip to content

feat(t27b): watch -- rebuild the object when a spec or its use closure is saved - #10874

Merged
gHashTag merged 10 commits into
masterfrom
feat/t27b-watch-10859
Oct 19, 2026
Merged

gHashTag merged 10 commits into
masterfrom
feat/t27b-watch-10859

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

Closes #10859. Part of epic #10863.

t27b watch <file.t27> -o <out.o> [--then '<cmd>'] builds once, then rebuilds the object after every settled save to the spec or to any spec in its use closure.

Where the decisions live

  • specs/tri/t27b/watch_build.t27 (new): when a build starts, how long the loop sleeps, publish only on success, --then only after a successful build. It reuses specs/verified/watch.t27 (poll interval, idle look) and specs/t27f/hot.t27 (save debounce) through use; no rule restated. 6/6 tests pass under t27c test-report, 0 vacuous.
  • specs/tri/t27b/usage.t27 (new): the usage text t27b help prints, moved out of a 29-line Rust literal. 2/2 tests, 0 vacuous.
  • gen/rust/tri/t27b/watch_build.rs, gen/rust/tri/t27b/usage.rs: t27c gen-rust output, force-added because gen/ is ignored.
  • cli/t27b/src/main.rs: thin glue, 40 added / 46 removed, so hand-written Rust shrinks (owner rule: no net growth). The build writes <out>.watch-tmp and renames it over <out> only on success, so a hot-reloading app never maps a half-written object.
  • docs/reports/t27b_expectations.json: both new specs listed for the ratchet.

Measured on the Railway lab

t27b watch specs/tri/t27b/watch_build.t27 -o /tmp/wt/wb.o --then 'date +%s%N >> then.log':

  • initial build: 13 closure files, --then ran once, exit 0;
  • save to the root spec: --then ran 45 ms after the save;
  • save to a closure member (specs/t27f/hot.t27): rebuilt in 94 ms;
  • save with a type error: error printed ("type mismatch at line 98"), object byte-identical (sha256 5f6cb42f...325c before and after), --then ran 0 times;
  • idle: 0 s CPU over 19 s.

cargo build --release -p t27b exits 0 on the lab, and t27b help prints the generated text (2219 bytes).

Inherited reds

Not from this diff: scan flags specs/tri/worktrees/reap.t27, coverage flags gen-drift in six compiler seals, and the ratchet lists other unlisted specs already on master.

🤖 Generated with Claude Code

gHashTag and others added 6 commits October 19, 2026 12:06
…10859)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…constant (Refs #10859)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ure is saved (Refs #10859)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…build.t27 (Refs #10859)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…efs #10859)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-19 05:26:34 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 44
PRs with All Checks Green 6
READY 2
FAILING 44
PENDING 0
NO CHECKS YET 0

These columns do not partition: 2 + 44 + 0 + 0 = 46, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=88b8cb73ceda != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

gHashTag and others added 2 commits October 19, 2026 12:32
… shrinks hand Rust (Refs #10859)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gHashTag and others added 2 commits October 19, 2026 12:33
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-19 05:48:35 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 37
PRs with All Checks Green 13
READY 2
FAILING 37
PENDING 0
NO CHECKS YET 0

These columns do not partition: 2 + 37 + 0 + 0 = 39, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=88b8cb73ceda != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@gHashTag
gHashTag merged commit b258b90 into master Oct 19, 2026
32 of 39 checks passed
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.

t27b watch: rebuild the object when a spec or its use closure is saved

1 participant