Skip to content

feat: land P7 crunch carry (plugins) - #543

Merged
acamarata merged 65 commits into
mainfrom
land/p7f-plugins
Oct 30, 2026
Merged

acamarata merged 65 commits into
mainfrom
land/p7f-plugins

Conversation

@acamarata

Copy link
Copy Markdown
Contributor

Lands the P7 crunch carry for plugins (refs/capp/crunch-carry/p7f-plugins, b3f4508a) as one squashed change: the 43 carry commits not yet on main, merged over the 45 main commits since their base. On conflict, main's newer behaviour wins.

Tickets

P7-AUTO-03, P7-AUTO-04, P7-AUTO-05, P7-AUTO-06, P7-AUTO-07, P7-AUTO-09, P7-AUTO-10, P7-AUTO-11, P7-AUTO-12, P7-AUTO-13, P7-AUTO-14, P7-AUTO-15, P7-AUTO-17, P7-AUTO-19, P7-AUTO-20, P7-AUTO-21, P7-AUTO-24, P7-AUTO-25, P7-CACHE-11, P7-CACHE-12, P7-CACHE-13, P7-CACHE-21 (receiver), P7-CI-46, P7-CI-48, P7-CI-62, P7-CI-65, P7-CI-66, P7-HOST-15, P7-NODE-11, P7-NODE-17, P7-NODE-18, P7-NODE-30, P7-PLUG-39, P7-SCHED-14, P7-SCHED-16, P7-SCHED-20, P7-TRUST-16, P7-TRUTH-10, P7-TRUTH-37

Conflict resolution

  • cmd/plan_placement.go: keeps main's trust class and run-scope values. The carry's placementRun global is removed because schedRevisionValues reads the same flags. attachPlacement now calls main's buildPlanned.
  • internal/agent/session/control.go: handles both upgrade frames (from main) and digest/chunk restore frames (from the carry).
  • internal/transport/agent/driver.go: the route keeps main's result fields plus the carry's restore offsets and arm hook.
  • Trust-Security-and-Privacy.md: keeps the carry's structure. Main's new sections are added in it: production boundary, cert issuance, audit recovery, policy limit, node registry preparation and isolation availability.
  • Reference.md: refgen owns this page. The pull-agent reference generator now writes Agent-Reference.md, which refgen links from the sidebar.

Fixes needed for a green merged tree

  • refgen now resolves the serve install|uninstall keys, and an unresolved key error names its file.
  • Added surface spec rows for nodes forget-project, serve admin cert, serve watch and the explain scheduling flags, then regenerated plugin.json.
  • Tests now match what ships: the pools.record publish-gate slot, the auto preset, an abandoned fleet reader, and refgen's own codes.go.
  • The ci surface ceiling no longer counts the hidden internal netproxy helper.
  • Removed the orphan Transactional-Email wiki page. Main stopped serving that plugin in D-1458.
  • Fixed truth findings caused by main's two-line claim matching: blank lines split footer metadata, a port-range label is reworded, and the rule's own example is exempted with a reason.

Local verification (scoped; machine load was about 115)

  • free/ci: go build and go vet (-mod=vendor) are clean. go test passes on the 51 touched packages, except two tests that depend on timing under load. TestRunsWait fails the same way on a clean origin/main checkout. TestStatsQueryPlan misses its 5 s budget.
  • Generators are current: refgen -check, manifestgen, generate-ci-agent-reference.py --check and its tests, generate-wiki-plugin-page.py --all --check and its 28 tests.
  • All six truth gate kinds pass against .github/truth/repo.yaml.

Not superseded

#493, #491, #452, #450, #435 and #282 are not contained in this change: each would still add content after it merges. They stay open.

Brings the P7 crunch carry (refs/capp/crunch-carry/p7f-plugins, b3f4508a)
onto main as one change: 43 commits not yet on main, merged over the 45
main commits since their base, keeping main's newer behaviour on conflict.

Tickets: P7-AUTO-03 04 05 06 07 09 10 11 12 13 14 15 17 19 20 21 24 25,
P7-CACHE-11 12 13 21, P7-CI-46 48 62 65 66, P7-HOST-15, P7-NODE-11 17 18 30,
P7-PLUG-39, P7-SCHED-14 16 20, P7-TRUST-16, P7-TRUTH-10 37.

Conflict resolution:
- plan placement keeps main's trust class and run-scope values; the
  carry's placementRun global is gone (schedRevisionValues reads the same
  flags) and attachPlacement uses main's buildPlanned.
- agent session handles upgrade (main) and digest/chunk restore frames
  (carry); the transport route keeps main's result fields and the carry's
  restore offsets and arm hook.
- Trust-Security-and-Privacy.md keeps the carry's structure and adds
  main's production boundary, cert issuance, audit recovery, policy limit,
  node registry preparation and isolation availability sections.
- Reference.md is owned by refgen; the pull-agent reference generator
  now writes Agent-Reference.md, linked from the sidebar.

Fixes so the merged tree is green:
- refgen resolves serve install/uninstall keys; unresolved keys name the file.
- surface spec rows for nodes forget-project, serve admin cert, serve watch
  and the explain scheduling flags; plugin.json regenerated.
- tests follow shipped behaviour: the pools.record publish gate slot,
  the auto preset, an abandoned fleet reader, and refgen's codes.go.
- the ci surface ceiling skips the hidden internal netproxy helper.
- removes the Transactional-Email wiki page; main stopped serving the
  plugin (D-1458) and the page was an orphan.
- truth findings from main's two-line claim matching: blank lines split
  footer metadata, a port range label reworded, the rule's own example
  exempted with a reason.
nself-ci ci-test failed on the architecture layers test: internal/preflight,
tools/doccmds and tools/refgen had no layers row, and tools/doccmds imported
os/exec. doccmds now runs its blocks and the fixture git init through
internal/exec, with the same fixture environment and timeout.

Hygiene file-size: the serve watch head scan moves to serve_watch_scan.go and
the machine-surface and ceiling helpers of the wiki page generator move to
scripts/wiki_plugin_surface.py; both files are now under 300 lines.
Home lab, several projects, a team and agents. Host steps are text blocks
with a proven-by test; scripts/docs/check-walkthroughs.py checks every
nself ci command path and bare flag against the generated Reference and
every proof against the repository, with a self-test over bad fixtures.
refgen adds the four pages to the guides/ci sidebar block.
…t (P7-AUTO-05)

TestDispatchFillsQueuedMs: place derives QueuedMs from EnqueuedAt at the
tick clock; a job never enqueued or a clock that went back reads as no
wait. TestPlanShowsTierAndWait: under auto the held job's cell carries
tier.waiting with the wait left, the chosen line shows tier and bias,
and other presets print no tier text.
…ate (P7-AUTO-20)

Planted stuck claim, leaked job root, infra failures and others each flip
only their own check; the alert goes out once per failing set per UTC day
and retries a set no sink took; tidy is report-only without --apply and
applies exactly the planned items. templates/audit-pipeline.yml is a
schedule-only pipeline (background band) for govulncheck, pnpm audit and
go test -race; a watcher drill shows a not-ready host never starts it.
TestScanHeadsConditional: after a full scan, an unchanged repository costs
two (three with extra branches) conditional 304 requests and nothing more;
a new pull request is read in full. TestConditionalRequests: a 304 scan
keeps the previous heads, and two hosts poll at distinct offsets with a
wait inside [0.9, 1.1) of the interval.

fix(ci): ScanHeads returned Calls as 0 on every path because the deferred
count wrote a local copy; the result is now named.
… branch (P7-CI-46)

Brings free/ci/bench (cibench, fixtures, budgets, ratio check), the two
layers.yaml rows and the spawn exemption, and the ci-bench workflow from
p7/P7-CI-46 at 8b121a8, unchanged, so it can be re-measured here.
…scenario (P7-CI-46)

The executor now refuses a job without an explicit isolation policy (E611); the
no-op job measured by ci.exec_overhead runs under the baseline process policy.
…its drill (P7-CACHE-11)

TestCacheSecMatrix runs every matrix.yaml case against the real stores and
engines, compares outcome, code, reason key and audit row with the expected
row and writes testdata/results.json. scripts/drill/cache-security/run runs it
and checks the case to threat-model mapping.
Adds TestOffloadDirtyTreeToNode and TestOffloadCancelCleansRef, plus a
failing-job tail case, over the foreground-remote fixture with a real
checkout receiver on the node.
…ag (P7-CI-62, P7-CI-48)

The wiki plugin-page generator emitted rows for subcommands only, so
nself_ci had no machine-surface row. refgen read FlagSet calls in cmd
only, so listener flags (RegisterListener, one from a literal table)
and flags defined in internal packages were missing from Reference.md.
Both generators are fixed and the pages regenerated; tests fail on the
omission, and a guard test fails when a new package defines flags
refgen does not read.
schedbench seeds a throwaway store with CreateAttempt, and cibench and
schedbench define their own flags; both are benchmark tools, not nself ci
code paths. Folding #550 and #554 onto the landing branch surfaced both.
Drop the CI.md no-op test (the region no-op test already snapshots every
page, CI.md included) and two redundant lines; folding #552 pushed the
file to 308 lines.
…(P7-CI-46)

The 14 ms ceiling came from 2026-10-18 hosted runs of a binary with far fewer
packages. After help stopped opening the store and running git, what remains
is process start and package init; three ubuntu-latest runs of b7bc9e8
(40964823298, 40968683609, 40968687140) give p95 25.3, 26.9 and 24.2 ms, so
the ceiling is the worst p95 plus 25 percent, rounded up (cibench
-write-budget): 34 ms. No other ceiling changes. (P7-CI-46)
The subcommand help intercept from #558 printed a generic usage line for
nodes provision and verify and answered --help after a bad flag with exit 0.
Core prints its captured help and reports the first parse error. Those two
keys now answer through provision.HelpOnly, which parses the command's own
flags and prints the captured text, still without running anything.
parity-nodes passes again (6 help cases differed).
The help intercept from #558 turned `nself-ci run --help` into a one-line
usage on stdout. Deployed 1.4.x CLIs run this binary and its argv and output
are frozen until v1.6.0: flag usage on stderr, exit 0, exit 2 for a bad
flag. run now answers help through the same flag set, still without running
the pipeline; parity-with-core leg 2 run --help matches again.
…10 minute queue cap

The pinned 1.2.11 gave every untriggered run a 10 minute foreground queue cap. With 13 gate jobs
on 4 slots the last two queued past it and ended E693, reported as infra.executor with an empty
excerpt. 1.2.13 drops the cap for a non-interactive run; a same-repository PR head is passed
--trust owner as the source leg already does (E625 otherwise).

Also: an evidence check whose job printed nothing now carries the error text as its excerpt, and
the generated CI reference is refreshed (doc-commands).
@acamarata
acamarata merged commit 8494eb1 into main Oct 30, 2026
43 of 50 checks passed
@acamarata
acamarata deleted the land/p7f-plugins branch October 30, 2026 03:13
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