Skip to content

Build one dependency graph for every check, test and Clippy run - #6724

Merged
Sinity merged 1 commit into
masterfrom
build/one-dependency-graph-20261108
Nov 9, 2026
Merged

Sinity merged 1 commit into
masterfrom
build/one-dependency-graph-20261108

Conversation

@Sinity

@Sinity Sinity commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

Problem

Each xtask check resolved the workspace five ways: workspace Clippy, standalone Clippy, standalone tests, primary tests, and focused -p runs. Each feature difference below polylogue-model rebuilt the whole workspace. Examples:

  • serde_json with float_roundtrip and preserve_order from the Sinex crates;
  • schemars with uuid1;
  • test-only serde_json/preserve_order in the store;
  • daemon-only rustix/event;
  • different syn/serde/tokio features under -p.

The last passing full check (run 5626) spent 3288 of 3461 s compiling. Its primary test build took 1894 s, rebuilding what the standalone build had just compiled. Focused run 5438 spent 3531 s building and 4.7 s testing. Analysis: Part 5 build/test report (F1–F3, R1, R3).

Change

  • Shared dependencies declare their features once in [workspace.dependencies], and crates add none. Only dev-dependencies add test-only features, and every test build now selects the whole workspace.
    • serde_json gains preserve_order and float_roundtrip, so standalone now matches primary and the tested configuration.
    • schemars gets uuid1, rusqlite gets blob and hooks, rustix gets event, uuid gets v4.
    • tokio gets the application's runtime features.
  • Every test command builds --workspace with one feature list (Sinex client plus fault features). -p, --exclude and --changed become nextest package filters, and feature flags are refused.
    • Tests run in the primary-mode build.
    • A standalone Clippy pass still compiles the code that the Sinex client replaces.
  • xtask test type-checks every target first, so test-code errors surface before code generation.
  • Removed: xtask sinex-client, its AgentCTL operation, and the cargo tree visibility logic.
  • Workspace code compiles at opt-level 0; dependencies stay at 2. The store's unit-test binary took 301 s of CPU at level 1 and 57 s at level 0.
  • AGENTS.md and docs/development.md describe the single graph.

Verification

  • cargo tree resolution comparison, with no build:
    • the test build, workspace Clippy and every focused selection are now one resolution;
    • standalone Clippy differs from it in 11 packages, check-mode only (tokio test-util from async-nats, bytes and futures features);
    • before, the standalone and primary test builds differed in 15 packages and workspace and standalone Clippy in 16.
  • xtask's own tests run in the full check.
  • Full xtask check on this head passed on GitHub Actions (run 42539525989, cold cache): Clippy 125 s, standalone Clippy 30 s, test build 255 s, 2764 tests in 281 s. The previous master run (42539212332, also cold) took 32 min in xtask check: test build 718 s plus a second primary-mode test build of 550 s that no longer exists.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AcQETkbTfFMr1hgNJ8A3em

@Sinity

Sinity commented Nov 8, 2026

Copy link
Copy Markdown
Owner Author

First xtask check on 3151654 (job polylogue-check-46496830, 18:51–20:51): fmt, boundaries and both Clippy passes passed with no diagnostics. Then, with the dependency units from the old baseline no longer matching, the cold test build hit the 7200 s limit while compiling the last unit (the daemon crate), at host IO pressure of about 70% full (avg300). No test ran. A warm rerun is queued as polylogue-check-10ac5aec. The master baseline now moves forcibly (Sinnix 3f0f01c01, live in a8573fc3d), so seeding works again once this lands.

Sinity added a commit that referenced this pull request Nov 8, 2026
…e examples (#6729)

Deletes apparatus found by the 11-08 audit
(`analysis/audits-20261108/apparatus.md` A1–A3): the planned-pages
reference index for a docs generator that was never built, a committed
bundle schema whose only reader compared it with the code, unreferenced
schema snapshots and examples, an environment override nothing set,
seven ignored measurement tests and three probe programs outside `xtask
bench`, and byte-identical Morrow copies (the parents set now reuses
sessions #1–#4). The render README becomes the crate's module docs.

Not included: removing the crate-dependency allow-list and the
hand-written formatting list in xtask; both wait for #6724, which
rewrites the same file.

Verification: agentctl `fmt` passed; `compile --tests --examples` for
model, sources, store, render, engine, testkit and polylogue passed with
no warnings. Nothing deleted had a non-test caller.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01AcQETkbTfFMr1hgNJ8A3em

Co-authored-by: Claude Opus 5.5 <[email protected]>
Each check resolved the workspace five ways (workspace Clippy, standalone
Clippy, standalone tests, primary tests, focused -p runs), and every feature
difference below polylogue-model rebuilt the whole workspace: the last full
check spent 3288 of 3461 s compiling, half of it a second test build.

Shared dependencies now declare their features once in
[workspace.dependencies] (serde_json gains preserve_order and
float_roundtrip, schemars uuid1, rusqlite blob and hooks, rustix event, uuid
v4, tokio the application's runtime features) and crates add none. Every
test command builds the whole workspace with the Sinex client and fault
features; -p, --exclude and --changed become nextest filters. Tests run in
the primary-mode build; the standalone Clippy pass still compiles the code
the Sinex client replaces. `xtask test` type-checks every target first.
`xtask sinex-client` and its AgentCTL operation are gone. Workspace code
compiles at opt-level 0; dependencies stay at 2.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01AcQETkbTfFMr1hgNJ8A3em
@Sinity
Sinity force-pushed the build/one-dependency-graph-20261108 branch from 3151654 to 03ce700 Compare November 9, 2026 00:19
@Sinity
Sinity marked this pull request as ready for review November 9, 2026 00:59
@Sinity
Sinity merged commit 23515d1 into master Nov 9, 2026
2 checks passed
@chatgpt-codex-connector

Copy link
Copy Markdown

The account paying for this security review has reached its Codex usage limits. The payer can check the Codex usage dashboard. For personal accounts, using credits requires enabling “Use credits for security reviews” in Code review settings. If you do not manage the paying account, contact this repository's admins.

@Sinity
Sinity deleted the build/one-dependency-graph-20261108 branch November 9, 2026 00:59
Sinity added a commit that referenced this pull request Nov 9, 2026
The test stored 1500 backlog sessions, each a full ingest, to keep the pass
running while a hook event arrived. That took 64 s at opt-level 1, 105 s at
opt-level 0 (#6724), and crossed nextest's 120 s limit on slower runners.
The ordering needs far less: the event is stored after at most the 16 files
in the pool plus one commit group (about 100 files under the 1 MiB
in-flight limit), so 500 sessions keep a wide margin. The first wait also
fails if the pass ends without storing a session instead of spinning.

Bead: plnext-6lt5

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01AcQETkbTfFMr1hgNJ8A3em
Sinity added a commit that referenced this pull request Nov 9, 2026
The test stored 1500 backlog sessions, each a full ingest, so that the pass
was probably still running when the hook event arrived. That took 64 s at
opt-level 1 and 105 s at opt-level 0 (#6724), and crossed nextest's 120 s
limit on slower runners; the ordering still depended on runner speed.

A new `Hold` fault action stops a thread at an armed point until the test
releases it. The test holds the pass before parsing its 21st backlog file,
writes the hook event, and releases. The event then goes in after at most
the 16 files already in the pool and one commit group, so 200 backlog
sessions show the ordering on any runner.

Bead: plnext-6lt5

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01AcQETkbTfFMr1hgNJ8A3em
Sinity added a commit that referenced this pull request Nov 9, 2026
The test stored 1500 backlog sessions, each a full ingest, so that the pass
was probably still running when the hook event arrived. That took 64 s at
opt-level 1 and 105 s at opt-level 0 (#6724), and crossed nextest's 120 s
limit on slower runners; the ordering still depended on runner speed.

A new `Hold` fault action stops a thread at an armed point until the test
releases it. The test holds the pass before parsing its 21st backlog file,
writes the hook event, and releases. The event then goes in after at most
the 16 files already in the pool and one commit group, so 200 backlog
sessions show the ordering on any runner.

Bead: plnext-6lt5

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01AcQETkbTfFMr1hgNJ8A3em
Sinity added a commit that referenced this pull request Nov 9, 2026
…#6740)

Unblocks the required `check` on master.

**Live-first test (plnext-6lt5).**
`passes::live_first::a_spool_file_arriving_mid_pass_is_stored_before_the_backlog_ends`
stored 1500 backlog sessions, each a full ingest, so that the pass would
probably still be running when the test wrote a hook event after seeing
the first stored session. It took 64 s at opt-level 1 and 105 s at
opt-level 0 (#6724), and hit nextest's 120 s limit on slower runners
from #6732 on. The ordering it checked was a race: a fast enough engine,
or a test thread descheduled long enough, would finish the backlog
before the event arrived.

Now the ordering is deterministic. A new `Hold` fault action
(`polylogue_store::fault`, test builds only) stops a thread at an armed
point until the test calls `release`; `held` says whether it got there.
The test arms `parse` for backlog files with 20 skips, waits until the
worker is held before its 21st backlog file, writes the hook event, and
releases. On release the pass sees the event at its next live check and
puts it ahead of the waiting backlog, so it is stored after at most the
16 files already in the pool plus one commit group (about 100 of these
files under the 1 MiB in-flight limit). With 200 backlog sessions the
assertion `behind < BACKLOG` holds on any runner, and fails if live
inputs stop going first (the event would then wait for all 200). The
timeout is unchanged. #6733 had already cut the backlog to 200 with the
race intact; this keeps 200 and removes the race. On CI the test took
10.6 s.

Verification: this PR's Actions `check` run.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01AcQETkbTfFMr1hgNJ8A3em

Co-authored-by: Claude Opus 5.5 <[email protected]>
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