# Quality Gates Status: Active on this repository; reusable presets ship in the current published package. ## Feedback layers The checks are intentionally layered so agents get fast feedback without weakening the merge gate. | Layer | Command | Purpose | | --- | --- | --- | | Changed | `bun tools/dev.mts check:changed` | Foundation-routed checks for the current Git delta | | Fast | `bun tools/dev.mts check:fast` | Terminology contract, fail-closed test manifests, formatting, Oxlint syntax/correctness, and pinned TypeScript 7 | | Terminology | `pnpm docs:terminology:check` | Canonical glossary sections, qualification scopes, and entry-point links | | Architecture | `pnpm foundation:check` | All declared deterministic capabilities, including docs and ADR governance | | Workflow security | `pnpm security:workflows` | Pinned Actionlint and Zizmor capability qualification for all workflows and local actions | | Buf capability qualification E2E | `pnpm buf-qualification:e2e` | Real pinned Buf `FILE` compatible, breaking and fabricated-evidence scenarios | | Patterns | `pnpm architecture:patterns` | Consumer-owned deterministic AST prohibitions | | Dead code | `pnpm dead-code:check` | Unused files, exports, types, and dependencies | | Full | `pnpm check` | Complete deterministic package and consumer conformance with coverage thresholds | | Full PR request | `pnpm ci:full -- --pr N --wait` | Explicit complete native qualification bound to the final PR head and base | | Local diagnostic | `node tools/dev.mts --profile node verify` | Local sequential equivalent of all required Linux evidence | | Coverage | `pnpm test:coverage` | Local native Node coverage-threshold qualification for lines, branches, and functions | | Partitioned coverage | `pnpm test:coverage:evidence:built -- --input --head-sha ` | Blocking CI coverage qualification of exact-head raw V8 evidence from the eight isolated Linux test shards | | Performance | `pnpm test:performance:built` | Advisory 100/1,000/5,000-document timing evidence outside the pull request gate | `check:changed` always belongs to the actual source checkout: its consumer, workflow policy, Bun installation and Git cwd are the source's. A Node-profile launcher routes this command back to that source-owned operation; this is not isolated Node-profile qualification. Git diff reads an owned disposable copy of the real index, because stat-only refresh can otherwise change index bytes even with optional locks disabled. Selected change groups retain normal Git semantics. The command host supplies its captured process environment to workflow process execution. Per-call environment overrides preserve those operator settings; snapshot reads always override the index path and disable optional Git locks. Environment name identity follows the platform, and undefined overrides remove the corresponding variable. Ordinary child commands discard inherited repository, index, object-store and injected-config selectors while preserving Git transport, identity and normal global configuration. Explicit source authority is local to source Git reads. The repository-wide selected check uses the private `check:changed:repository` script. It creates a dedicated owned Node profile and delegates installation and the unchanged full `check` to `tools/dev.mts`. Source Git selection and the outer Bun workflow remain in the source checkout; package qualification runs in the actual pnpm projection required by its owner. Inherited profile targets and source identities cannot select that temporary profile. A successful mutable invocation remains feedback-only, with unverified input binding and no qualified facets. Local full diagnostics still require the explicit generation2 Node and managed test tools described in [Node compatibility](node-26-compatibility.md) and [managed runtime qualification](../reference/node26-managed-runtime-observation.md). Outside that dedicated full-check route, direct Bun package qualification crosses only `package:check:built` into `node tools/dev.mts --profile node package:check:built`. Prepare that explicit projection with `node tools/dev.mts --profile node install` before invoking it. Other phases, workflow policy and Git observation stay in the Bun source checkout. The package phase verifies actual source Git identity, inherited source-root/SHA claims, owned projection location, complete projected source bytes and installed pnpm virtual store before compilation. Missing, stale, foreign or modified projections refuse; this direct phase never installs dependencies automatically. Reprepare it after source changes. An admitted Node projection retains its existing pnpm execution path. Local Node 26 test and package routes require the explicit physical Node 24 port `PACK_TEST_GENERATION2_NODE` for the retained generation2 suites, matching native CI. Preserve host Git hooks and supply the required author/committer identity when disposable fixtures create ordinary commits. Node-profile lint first checks all non-generated source bytes and paths against the source checkout. Only the three declared manager/workflow/dependency-policy projections are normalized, after validating their exact derived bytes. The pinned Oxlint CLI selects files in the source checkout and reselects those explicit filenames in the isolated tree; this avoids ignored-parent traversal without disabling intentional ignores or substituting another scanner. Both observations and lint use the same configuration and protective flags. Empty selection fails, and command arguments are bounded and passed without a shell. Foundation's self-dogfood lifecycle is explicit and ordered: 1. `pnpm foundation:bootstrap` builds current workspace source with the pinned compiler and package manager, without invoking the Foundation CLI. 2. `pnpm foundation:dogfood` runs the freshly built Foundation CLI against this repository. Existing CI jobs may use `foundation:check:built` only after their preceding build step succeeds. 3. `pnpm foundation:qualification` first repeats that source dogfood, then runs artifact qualification against packed and hermetic-registry artifacts and finally runs the pinned published-operation compatibility oracle. Published versions never govern current-source checking. The private root may link Foundation with `workspace:*` for tool resolution. The published Foundation manifest cannot depend on itself, Foundation source cannot depend on Docs Protocol, and no bootstrap package or published dependency cycle is part of this lifecycle. `pnpm check` is the deterministic repository and package conformance layer. It does not claim networked, hosted, or external-tool capability qualification. `node tools/dev.mts --profile node verify` is the single local command matching the union of Linux merge lanes: workflow security, the deterministic check, Buf, hermetic registry installation, published-version compatibility, dead-code analysis, and parser parity. During the single [native API baseline transition](../architecture/public-api-compatibility.md#release-qualification-remains-required), the private Foundation driver additionally authenticates fixed historical npm archives and the protected-main archive qualification record. This temporary migration route requires network access, GitHub Actions read access, and npm `11.19.0`; the complete ordinary deterministic report remains separate and unchanged. Successful ordinary checking after native baseline promotion skips that acquisition entirely. Archive acquisition and protected-host authentication remain private repository tooling. The shared comparison and promotion mechanism is the explicit [public native transition](../reference/public-api-native-transition.md) on the existing public API promotion command; it adds no capability enrollment or hosted qualification claim. Partitioned c8 coverage is the blocking Linux CI coverage authority. Each existing Linux test shard writes raw V8 coverage without rerunning its tests. Its sidecar binds the full Git SHA, exact Node and c8 versions, coverage-config digest, test-manifest digest, shard identity, test list, and every raw-file digest. The aggregator accepts exactly one artifact for each of shards 1 through 8, rejects missing, unexpected, mixed, duplicate-claim, or modified evidence, retains the exact bounded bytes it validated, merges once, and applies the separate c8 floors of 70% lines, 77% branches, and 78% functions. The promoted floors are below the observed exact-head CI result of 71.88%, 78.97%, and 79.86% respectively. Raw evidence is capped at 16 MiB per file, 512 files and 128 MiB per shard, and 384 MiB across all eight shards. CI run `37323732047` exceeded the former 288 MiB aggregate cap after edge tests were added; the 384 MiB cap admits the approximately 336 MiB eight-shard regression without omitting raw files. `c8` is used only for merge/report because the Node test runner can emit raw V8 JSON but cannot consume coverage from completed processes. The evidence merger owns `c8` as a pinned CLI-only dependency, so Knip excludes that dependency from import-based usage detection. Its process-tree fixture is an explicit Knip entry because Node launches it directly rather than importing it from the test module. The transaction architecture counterexamples in `tests/foundation-local-mode-transaction-e2e.test.mjs` generate imports of `foundation-state-contract.ts` and `schema-ids.ts` inside disposable copies. These two files are explicit Knip entries because those generated imports are not visible in its static test graph. Other internal facades remain subject to unused-export checks. The six source entrypoints in the repository-agent-workflow, source-dependencies v1/v2 and suppression-governance fixtures are also explicit Knip entries. Their owning tests copy those package trees and inspect them as source data, so there is no runtime import from a test to the fixture. Knip still traverses their ordinary imports, and all fixture files remain in the project inventory. Three exact source-dependency fixture leaves are classified only for the `unlisted` issue: their `@fixture/core` and `zod` imports are declared in the synthetic package manifests copied by the tests. Those independent fixtures reuse package names and a private catalog; they are not root workspace dependencies. All other issue checks still apply to those files. The shard's test result, all eight artifact uploads, evidence aggregation, and the stable `linux-coverage` context are fail-closed. An evidence setup or sidecar finalization failure may preserve the original shard test result, but the required upload or merger then fails. Raw instrumentation still shares each shard's test process and its timeout. The former standalone native Node CI lane and the partitioned-coverage kill switch are removed. Native Node coverage remains available locally through `pnpm test:coverage` and remains part of `pnpm check` and `node tools/dev.mts --profile node verify`; its thresholds stay separate because Node and c8 calculate the measured universe differently. Required CI executes the same evidence as independent jobs. Linux uses eight checked-in serial test shards in four fixed pairs. Each pair runs two producers concurrently, with separate Git checkouts, dependency installs, builds, test processes and temporary directories. All eight producers remain mandatory and upload their own exact-head raw evidence; fail-fast is disabled, and the coverage aggregate requires the entire matrix. Only producer 4 receives the declared managed consumer tools. A producer failure drains the other started producer, retains both exit statuses and fails the job. Each pair has a 25-minute bound. Release admission accounts for any configured matrix batches, keeping the configured Linux path below the unchanged 72-minute Windows bound. Queue delay remains outside job timeout arithmetic. Pairing reduces runner slots from eight jobs to four; performance is measured on native CI, rather than inferred from job counts. The evidence aggregator accepts only the canonical checkout layout or the complete fixed paired layout (odd shards in `a`, even shards in `b`). Mixed layouts and unexpected roots fail. After validating the original bounded bytes and their sidecars, it projects the trusted producer paths in derived c8 input copies onto its checkout. Original raw evidence, function ranges and execution counts remain unchanged. Windows uses five isolated lanes: C contains only the installed loader CLI suite; A, B, D and E use the independently balanced checked-in Windows partition. Its closed dispatch validates the complete canonical inventory before platform filtering and requires the exact portable union once. Missing pinned entries, duplicate assignments, incomplete partitions and new unassigned files reject dispatch until the Windows policy is updated explicitly. Raw coverage-only suites stay Linux-only and are distributed across the same eight exact-head producers. Package, registry, published-version, coverage and static qualifications run in parallel checkouts. The stable required contexts `check` and `windows-check` reject a failed, cancelled, skipped or missing prerequisite, including every new test job. Every executable pull request job depends directly on Dependency Review. Both aggregates retain the complete Node 24/26 compatibility matrix. The static partition uses all 281 whole-file timing records from successful [CI run 37154414643](https://github.com/agent-teams-ai/engineering-foundation/actions/runs/37154414643) at `331e97758fd83e6a0da69a3400b3bfe8aa8d0aee`. Paths match the most-specific inventory suffix, so a package test cannot inherit a same-named root test's measurement. A longest-first assignment minimizes the larger normalized Linux raw-coverage (440 seconds) and portable Windows (450 seconds) load; ties use Linux load, then numeric shard ID. Loader stays in shard 3; both Linux-only managed suites stay in shard 4 with its pinned Node 26 tools. Original relative order is retained inside each resulting canonical and raw-only list. All existing 239 canonical and 42 raw-only files, exact mandatory identities, no-skip enforcement and `--test-concurrency=1` remain intact. The new materialization regression suite joins shard 5, bringing the prior inventory to 282 files. The private full-CI request regression suite is pinned in canonical shard 5 and Windows lane B, bringing the inventory to 283 files. Every test checkout retains Git history for committed-delta checks. The resulting projections are about 439 seconds per Linux shard and at most 448 seconds per former Windows lane, except for the isolated loader. That nine-lane candidate increased runner contention. The independent five-lane Windows partition projects about 734 seconds per residual lane and retains the loader as its own lane. These are estimates from one run, excluding setup, queueing and future variance. The Windows policy uses longest-processing-time-first assignment across A, B, D and E using Windows timings alone, with canonical traversal order and then lane ID as tie-breakers. It preserves that traversal order inside each resulting lane. The new materialization suite is unmeasured and contributes zero only to this advisory projection; it remains mandatory at execution. Final exact-head Linux, Windows and macOS CI must establish actual behavior. Before opening a PR, run the changed and fast gates, workflow security and focused checks for the changed behavior. Merge still requires independent technical review and the explicitly requested complete `full-ci` matrix on the final PR head and base, including all native qualifications and the partitioned coverage authority. A second sequential local `node tools/dev.mts --profile node verify` is not an additional merge prerequisite when CI supplies that evidence. Keep the full local diagnostic command when full CI cannot run or a changed risk is not covered; retain any uncovered check. Pending CI alone does not require a duplicate local full run. Older-SHA results cannot be relabeled as current-head CI. The Windows loader remains isolated. A candidate compile-cache experiment did not shorten its native Windows job and is not enabled. All Linux raw coverage producers explicitly set `NODE_DISABLE_COMPILE_CACHE=1`, since compiled functions can yield less precise V8 coverage. No cache substitutes for native qualification. All Windows static, test, package, registry, and published-version jobs set `TEMP` and `TMP` to the trusted runtime `RUNNER_TEMP` value through `GITHUB_ENV` after Node setup and before install, rebuild, build, or test subprocesses. A missing value fails the setup step. Linux and macOS retain their default temporary directories. [Windows experiment 37034137614](https://github.com/agent-teams-ai/engineering-foundation/actions/runs/37034137614) measured 27:16 with `C:\Users\RUNNER~1\AppData\Local\Temp` versus 14:42 with `D:\a\_temp`: 1.855x faster, saving 754 seconds. Both variants qualified all 34 build commands and two independent clean builds; all six archives matched versions, byte counts, and SHA-256 digests through the final post-process hash barrier. Defender was already disabled and unchanged. The experiment used source `a983c0ef2fdfc147508d1a9168a14f1e5a9f803c`; it is bounded baseline evidence, not a timing promise or artifact qualification for the current head. Existing timing and coverage workflow assertions and exact-head Windows CI must verify the final configuration. Shard invocations may pass `--timing-output ` to retain advisory per-file and per-test Node timings as `events.jsonl`. The mandatory path observes named completion events through the existing setup hook; its identity verifier remains the only stream consumer. The hook preserves the prior setup result, including asynchronous completion and rejection. Other shards keep TAP output alongside a private timing reporter. The parent writes records after the verdict, with write failures reported as warnings. Timing directories must be outside coverage evidence, including aliases. CI uses a separate runner-temp directory for each invocation and retains timings for 14 days, even when tests fail. Missing or failed timing uploads are advisory. Timings do not qualify mandatory identities or coverage. The timing observer remains passive: it does not select a partition or change serial test concurrency. Redistribution requires a separately reviewed manifest change. The required macOS qualification runs the real packaging containment tests via `node scripts/run-selected-tests.mjs tests/tooling.test.mjs`. Its transient and persistent retained-zombie cases are mandatory identities in `architecture/foundation/node-test-execution.json`: neither skip nor omission is admitted on Darwin. Exact `skipped` exceptions apply only on Linux and Windows, whose kernels do not supply these Darwin semantics. Python3 must be available on macOS; a missing interpreter fails the tests. Ordinary and Draft PRs receive automatic `PR Feedback` on opened, synchronize, reopened and ready-for-review events. Its blocking Dependency Review and SBOM precede dependency execution. The repository security baseline names this automatic workflow as its Dependency Review and SBOM authority. They are followed by `check:changed --base ` with complete history. CodeQL and identity retain their existing automatic triggers. Fast feedback can be green while a required `full-ci` remains Expected and blocks merge; passing feedback never qualifies the native matrix. Near merge, the agent explicitly requests full qualification without changing Draft state: ```bash pnpm ci:full -- --pr 123 --wait ``` Run this private helper from a trusted checkout of the base repository. Do not execute a fork-provided helper with a maintainer write credential. The private helper resolves the canonical repository and open PR, including fork PRs. CI accepts an actual `pull_request: labeled` event for legacy `ci:full` or any label starting with `ci:full:`. Either form admits the same complete Linux, Windows, macOS and Node 24/26 matrix and freezes the run name exactly as `Full CI # @ on `. The prefix is a request, not qualification or trusted workflow-source authority; its digest cannot select or omit jobs. A label left on a PR does not request full CI on later pushes. All opened, synchronize, reopened and ready-for-review feedback uses only `foundation-feedback-`, independent of full qualification. Full PR CI uses `foundation-pr---` from the frozen event snapshot. A delayed synchronize or different head/base request cannot cancel current full work. Duplicate manual requests for the same snapshot may supersede normally. Old-source work may finish; only evidence bound to the current head and base can qualify the PR. Safety depends on that binding, current required checks and strict up-to-date protection, rather than promising cancellation of old runs. Other labels use independent run groups and cannot create or overwrite any of `full-ci`, `check`, `windows-check` or `macos-qualification`. Removal is not a trigger. Distinct `ci-not-requested` job names prevent skipped checks on unrelated label events from satisfying these required gates. The shadow classifier remains advisory and cannot select or omit a native lane. `full-ci` runs in parallel with the three stable native aggregates. It requires successful Dependency Review and the complete union of their mandatory native jobs using pinned alls-green, with no skipped/neutral allowance. A regression checks that union so future lanes cannot be omitted. Its run name binds PR number, head SHA and base SHA. The helper reuses successful or in-progress runs only after checking that binding, canonical workflow ID/name/path, event, source repository/ref, PR association, run ID and attempt. Fork runs can omit GitHub's PR association array: those require a distinct fork repository, its exact branch and the frozen PR/head/base title; contradictory associations are rejected. Empty same-repository associations cannot qualify. Fork approvals remain prerequisites. GitHub's run name carries the immutable request title; workflow metadata separately identifies `CI`. Success additionally requires one actual successful bound job for each of `full-ci`, `check`, `windows-check` and `macos-qualification`. A label alone is never evidence. A changed head/base requires qualification for the new snapshot. Discovery is limited to three 100-entry pages per collection and twelve request observations five seconds apart, with a 20-second bound per CLI metadata call. Transport reads retry at most three times with 250/500ms backoff; malformed JSON is rejected immediately. `--wait` uses a bounded 90-minute watch, then rereads the run, native gate and PR. A head/base change or unsuccessful result fails closed; rerun the command for the final snapshot. `ready` describes observed full qualification; independent current-head review and all other required checks remain separate obligations. The new request protocol reserves `ci:full:<40 hexadecimal characters derived from the SHA-256 snapshot digest>` by creating that unique repository label before attaching it to the PR. Its description carries a per-caller owner UUID. Only the successful reservation owner attaches the label; losing callers observe/reuse the bound run, rather than issuing another attachment POST. The reservation binds the canonical repository, PR and frozen source snapshot; it neither attests workflow integrity nor authorizes a merge. The existing run-name remains unchanged, independent of the reservation label bytes. The integration owner's live TEST of repository-label creation with distinct owner nonces admitted one writer and one event. That creation is the admission primitive; an already attached label is not proof that only one request was made. A failed or timed-out creation can have taken effect. Reconcile through bounded reads of the exact repository label and owner UUID, PR attachment and bound run; do not attach without established reservation ownership, overwrite another owner's description, or blindly retry creation/attachment writes. Missing reads alone do not prove that a write did not occur. A reservation whose owner stopped before attachment can remain without a run and requires explicit inspection; this protocol claims no automatic expiry or safe delete/recreate takeover. Retrying failed jobs on an existing snapshot is a separate operation and must be serialized independently; a request reservation does not serialize reruns. The labeled request requires the user's existing authorized credential with base-repository label permissions. `GITHUB_TOKEN` label additions suppress the `labeled` workflow event. GitHub's `opened`/`synchronize` exceptions and their approval requirements do not supply a labeled-request exception. Required fork workflow approvals still apply. No write credential runs candidate PR code. For an unsuccessful completed bound run the helper reserves a separate key containing that run ID and attempt, and only its owner invokes `gh run rerun ID --failed` once. This retry label is never attached to the PR. Lost responses are reconciled by bounded reads of the next attempt, without repeating the write. GitHub's attempt-specific jobs endpoint includes inherited successful clones in our live qualification. Verify that complete current attempt; do not union historical successes. An explicit conflicting attempt, missing lane, skipped or neutral gate rejects qualification. A successful run with invalid gates is not blindly rerun. After an orphan reservation, inspect effects before making an explicit legacy `ci:full` request; automatic takeover is intentionally absent. Raw coverage evidence retains its existing one-day retention. Before rerunning coverage, inspect availability of all eight required raw artifacts. If artifacts are expired or missing, rerun only the Linux producer pairs containing the missing producers, then coverage aggregation and the affected aggregate gates. Each selected fixed pair regenerates both of its producers' evidence. Successful Windows, macOS and other Linux lanes remain effective for the same snapshot; artifact recovery does not require an all-OS rerun. Do not infer artifact expiry solely from run age, change retention on an unproven cost claim, or accept an incomplete evidence set. Main pushes, merge groups and workflow dispatch still run the complete native matrix. Dispatch checks do not satisfy ordinary PR rulesets. Generated release PRs retain the existing trusted exact-head/base attester: it prefers one bound attempt-1 PR run with the immutable admitted full-request title, otherwise dispatches CI, and now attests `full-ci` alongside `check`, `windows-check`, `macos-qualification` and separate CodeQL `analyze`. Every pending, terminal and recovery pass includes the new context. Five status contexts reserve 570 seconds, up from 456, requiring a 92-minute attester bound (up from 90); the 75-minute CI deadline and raw/native budgets are unchanged. The original native and aggregate timeouts remain intact. The new parallel metadata gate takes one minute, preserving the 72-minute configured critical path plus three-minute attestation margin. Queue time remains outside job timeout arithmetic. Strict up-to-date branch protection remains required. The label/gate delivery contract can be shared through the organization `.github` standard; concrete GitHub orchestration and this product's native matrix belong to the repository Host. This helper is private and declares no published API. New CI tooling and test harnesses use ordinary `.ts` within ESM packages and run with the pinned Node's native TypeScript stripping. Every new executable belongs to a strict TypeScript project in the required `typecheck` chain; stripping alone is not a typecheck. Existing `.mts` tooling retains `typecheck:ci-tooling` coverage. The blocking test inventory admits `.test.ts`, `.test.mts`, and `.test.mjs` with the same exact-once shard requirements. The native API and local parser tests use strict projects with `skipLibCheck:false`. Repository protection requires the stable exact-head contexts `CodeQL`, `analyze`, `check`, `windows-check`, and `macos-qualification`. The integration owner must add required `full-ci` only after observing a successful actual PR request on the final implementation; each new head must then supply that check. Independent review evidence belongs in the pull request (description or comment); it is not converted into a workflow-authored or self-attested status check. `ReviewGate` is retired. The current GitHub Free organization cannot configure the required-workflow control: the integration owner's actual configuration attempt returned HTTP 403. Requiring GitHub Actions integration `15368` authenticates the issuer, not the workflow's source; a candidate-controlled workflow can spoof a required check name from that same integration. Prefix admission and exact-head check success do not close this trust gap. No workflow-source tamper solver is introduced inside the privileged candidate. Independently protected workflow authority remains an unavailable capability under the current plan and requires separate owner action; this delivery must not be described as establishing it. Independent technical review remains mandatory for the current head, alongside complete native evidence and all required checks. The merging agent chooses its form (a separate local reviewer agent, a hosted review job, or another independent review), and a completed review of the current head is sufficient. A review that did not run as a hosted job has no machine-verified receipt; its record in the pull request is the evidence. Immediately before an owner squash, revalidate the live PR head/base, intended target and reviewed change, native qualification and independent review. Use the canonical organization [`scripts/merge-owner-pr.mjs`](https://github.com/agent-teams-ai/.github/blob/main/scripts/merge-owner-pr.mjs) with the reviewed `--expected-head`, explicit repository/PR, Conventional Commit subject and complete body file. That actor/head guard does not itself establish independent review or trusted workflow-source authority. The project controller owns commits and merge; patch workers do not write GitHub state. `tests/manifests/test-shards.v1.json` owns the complete shard inventory. `architecture/foundation/node-test-execution.json` declares Foundation's mandatory Node case identities. Built, shard, coverage, and focused QGR scripts fail when the contract is missing or invalid. Selected files with adopted identities use structured completion evidence; other selected files still run. Case variants and hard links to an adopted file are rejected before dispatch, including selections that also contain a canonical adopted file. The test manifest check requires every adopted file to belong to a required shard. Platform skips outside the declared identities retain their ordinary Node behavior. See [mandatory Node test execution](../reference/quality-gate-runner.md#mandatory-node-test-execution). QGR synthetic and real-pnpm lifecycle capability qualification retains exact-once placement in the checked-in shard manifests. The native Darwin job required by `macos-qualification` deliberately reruns the focused QGR lifecycle command after its Darwin build, including entrypoint cancellation and POSIX containment evidence; it does not rerun the complete shard. `tests/manifests/coverage.v1.json` pins their coverage-only additions, the merger, production include/exclude boundaries, c8 evidence thresholds, and the separate legacy Node coverage thresholds and test selection. The two threshold authorities remain explicit because Node and c8 do not calculate every metric identically. Together the manifests are the closed inventory of repository and Docs Protocol test files. `pnpm test:manifests:check` rejects missing, extra, duplicate, nested, non-portable, or symlinked test entries and malformed coverage configuration. Add or rename a test and update the shard manifest in the same change. Each shard's `tests` remain in the required inventory; repository selection routes only the two private managed-runtime observation/process suites to Linux x64, matching their [linux/x64 support contract](../reference/node26-managed-runtime-observation.md). `check-test-manifests.mjs` owns this finite two-path policy and rejects missing, renamed or additional managed-runtime suites until their platform policy is reviewed. Built, shard and legacy coverage runners apply the same platform/architecture selection. They report requested/selected counts and exact Linux x64-only paths; an empty dispatch refuses. The global inventory is validated against both manifests: Linux x64 admits every inventoried file; Windows, Darwin and other Linux architectures route only the two private managed suites to Linux x64. Required shard counts exclude the unchanged coverage-only additions; every portable required file and every declared mandatory identity remains selected. The portable managed-profile suite checks unsupported-platform refusal before IO, including Linux selections on actual unsupported hosts. The existing inert construction and unadmitted-close case lives in that portable suite as well. Such refusal is rejecting evidence, never a positive Linux runtime observation. Mandatory adoption of either Linux-only file requires a reviewed platform contract; the existing versioned mandatory contract and its exact identities remain unchanged. Raw coverage selection requires Linux x64 and retains the complete inventory across eight shards. The coverage manifest's `additionalTestsByShard` extends only the Linux raw-evidence run with suites that passed capability qualification elsewhere but are needed for the complete coverage universe. Keep `--test-concurrency=1` inside a shard because recovery tests intentionally share process and filesystem assumptions. The scheduled `Performance signals` workflow records benchmark JSON and a Job Summary, but has no absolute blocking threshold. The separate read-only `CI feedback` observer reads completed-run metadata from the GitHub API, reports the slowest lanes, and retains a source-bound JSON artifact for 30 days. It checks out only the protected default-branch observer code, never pull request code. Cancelled obsolete runs remain normal: agents use `check:changed`, `check:fast`, workflow security and focused risk checks before PR handoff. Merge requires independent review and complete successful current-code CI; the sequential local `verify` diagnostic is needed only for unavailable CI or a risk CI does not cover. Knip is blocking in the Linux CI job but is not repeated by Windows or the fast local loop. Nx supplies project discovery, affected builds, and caching; it does not define architecture policy. Ast-grep owns narrow syntax patterns such as ambient clock, environment, randomness, and timer access. The foundation source dependency capability is the only authority for package and architecture edges. Actionlint and zizmor are independent external gates run through the repo-owned Aqua bootstrap. It accepts only Aqua v2.62.3, uses a locally exact copy when available, otherwise downloads one committed SHA-256-verified macOS/Linux release archive into a private user cache with an atomic, lock-protected install. The bootstrap has no floating installer script or checked-in binary. Windows returns an explicit unsupported-platform precondition, and the Windows CI job does not invoke this gate. Aqua then enforces the committed registry and tool checksums in `aqua.yaml` and `aqua-checksums.json`. Actionlint discovers all workflow YAML files without a shell glob; Zizmor scans the repository root with strict collection, including local composite actions outside `.github`. Dependency Review is a direct prerequisite of every executable pull request job and is included by both required aggregators. CodeQL runs as a separate hosted analysis; none of these tools execute inside a normal capability check. Full local diagnostics use the isolated Node/pnpm projection. Run `node tools/dev.mts --profile node install` before `node tools/dev.mts --profile node verify`; package and coverage evidence must not be attributed to the source worktree's Bun dependency graph. The Bun default keeps changed and fast feedback in the source worktree. Package public API tests invoke the existing repository-owned pnpm command as a child process for the closed `pack --out ABS.tgz` operation. The Host verifies physical Node/pnpm identities, rejects lifecycle hooks before manager admission and disables scripts for packing. Package tests do not import repository tooling modules across their package source boundaries; no source-DAG exception or new module-system boundary is introduced. ## Foundation-first growth review (proposed) The [organization ecosystem vision](https://github.com/agent-teams-ai/.github/blob/main/docs/architecture/ecosystem-vision.md) expects many independent consumers and eventual codebase growth across products to tens of millions of lines. This is a planning target, not current measured capacity. Retain the accepted library-first ADR-0061 and existing safety gates; evaluate scalability before expanding product implementations. | Alternative | Reliability /10 | Complexity /10 | Fitness confidence /10 | Production/integration LOC (P) | Tests/fixtures LOC (T) | Engineer-days | | --- | ---: | ---: | ---: | ---: | ---: | ---: | | Federated owner scopes, dependency-aware checks and exact evidence reuse | 9 | 6 | 9 | 800–2,400 | 1,200–3,600 | 10–30 | | One shared analyzer/build graph across the inventoried consumer scopes | 7 | 8 | 8 | 1,200–3,200 | 1,800–4,800 | 15–45 | | Independent full checks with no shared impact/evidence mechanism | 8 | 5 | 8 | 400–1,200 | 600–1,800 | 5–15 | These are preliminary incremental estimates for the same bounded first comparison: existing checkers/toolchains, one existing consumer and disposable qualification fixtures. They cover handwritten tooling integration, input/evidence binding, invalidation or full-check instrumentation, and negative/consumer fixtures. They exclude generated, vendored and documentation bytes, new native or compiler implementations, new infrastructure/deployment, and ecosystem-wide adoption. The shared-graph row does not estimate a complete global analyzer. Independent full checks already exist: its range applies only if the comparison needs additional qualification or instrumentation; retaining sufficient existing coverage needs zero P/T. This documentation change itself has P = T = 0. Time assumes one experienced engineer, existing prerequisites and focused review. Sizing confidence is 3/10 until the capability/seam inventory is complete; re-estimate before implementing any option. The ranges are planning judgments, not measured results, a delivery promise or additive budgets. Fitness confidence is separate from sizing confidence. Reliability scores compare correct check invalidation within this bounded source/check scope; all scores are ordinal judgments, not availability guarantees or proof of the codebase-scale target. The first is the leading hypothesis; first inventory existing changed-check, source graph, public API, documentation, packed-consumer and CI input-proof capabilities. No new optimizer or graph authority is authorized here. Separate source dependency, compiler, composition, deployment and execution graphs; Foundation observes the applicable source/check contract and does not own product graphs. Consumers keep their own architecture policy. A private implementation edit should not invalidate unrelated packages unless it changes their actual qualification inputs. Federation's strongest counterexample is an undiscovered shared input: a cached result can look current while omitting an affected owner. A shared graph can expose that input but increases central coupling and over-invalidation risk. Full checks avoid impact-selection errors at the cost of repeated work. Compare each against the same complete full-check baseline and measured input changes. Keep that baseline authoritative during migration; admit scoped reuse only after complete invalidation evidence, with full fallback for unknown inputs. Qualification candidates: independent scoped builds, graph boundary and public-surface changes, deletions/renames, changed config or toolchain, transitive dependency changes, cross-scope invalidation, concurrent edits, cache corruption or stale evidence, full-check fallback on uncertainty, measured cold/incremental time and memory. Prove complete scope coverage and negative controls before reusing an earlier result. Extend existing qualification/performance fixtures rather than inventing a central analyzer. Representative sizes and budgets require owner review and actual measurements. Review qualified package cohorts separately: genuinely independent lint and development tooling should be upgradeable independently; tightly coupled Docs Protocol/mutation packages retain compatible, verified closures. Compare independent package releases with qualified compatible cohorts and coordinated all-consumer upgrades. The preferred direction is independent releases with bounded cohorts only where needed. Current cohort rules remain authoritative; do not loosen physical-resolution, provenance, compiler or release checks. Use the existing central cohort route and a real consumer canary to resolve incompatible closures. No package pin, policy or execution behavior changes in this planning note. ## Feature ownership and complete production scope `pnpm quality:scope:check` retains EF-specific inventory, language, ambient-rule coverage and exact ambient exception validation. The [shared quality capability](../reference/quality-source-coverage.md) owns independent source/suppression coverage and actual Oxlint selection: `quality:coverage:scope` runs in the fast gate, and `lint:typed` runs the full CLI once in the full gate. `pnpm architecture:features:check` executes the [local adoption](../architecture/feature-module-standard.md) guard, including actual source edges. Both run in `check` and `check:fast`; unresolved ownership migrations fail closed. Typed lint covers every production `src`, including packaged qualification code, with unchanged rules and thresholds. ## Optional external documentation links The **External documentation links** workflow runs Lychee 0.24.2 once a week (Monday, 05:43 UTC) and on manual `workflow_dispatch`. It has no pull-request or push trigger and is not a required check. Broken links and scanner errors produce an advisory job summary and warning; they do not fail a pull request or a release. A download or checksum failure stops the optional job before running the scanner and is reported as incomplete. The scope is the root and documentation READMEs, direct Markdown children of `docs/development`, `docs/reference`, and `docs/architecture`, and package READMEs. Research archives, decisions, fixtures, code blocks, email addresses, private addresses, and reserved example domains are outside this network scan. Existing deterministic documentation gates continue to check local paths and anchors. The workflow downloads one SHA-256-verified native binary, without installing Foundation dependencies or adding a tool to the normal Aqua bootstrap. The scan has four concurrent requests, two per host, a five-second request timeout, no retries, and a two-minute overall budget. The entire job has a five-minute limit. An empty scope or interrupted scan is visible as incomplete, never a clean pass. HTTP errors and timeouts remain findings; there is no blanket success exception for rate limits or unavailable sites. To reproduce with the pinned Lychee binary: ```bash lychee --config .github/lychee.toml --format markdown -- \ README.md docs/README.md 'docs/development/*.md' 'docs/reference/*.md' \ 'docs/architecture/*.md' 'packages/*/README.md' ``` Review the summary in Actions before changing a link: a transient network or authentication failure does not prove the destination has moved. Disabling this workflow does not weaken the required local-link or package gates. ## Dependency updates Dependabot follows the repository's security-only update policy. The npm and GitHub Actions entries intentionally set `open-pull-requests-limit: 0`, which disables routine version-update pull requests. This does not disable Dependabot alerts or security-update pull requests; those are controlled by repository settings. The seven-day cooldown remains recorded in the configuration, but it does not make routine update pull requests active. No dependency update is automerged. Every proposed update must pass the same Linux, Windows, macOS, package, dependency-review, and independent review gates as a handwritten change. Changing the security-only policy is a separate repository decision, not an incidental consequence of adding a quality tool. Major `@types/node` updates remain on the accepted Node runtime line until a reviewed toolchain decision changes it. Major TypeScript updates are also manual because the build, public API adapter, and independent parser oracle all use the exact TypeScript 7 compiler. The parser oracle and native API tests have strict TypeScript projects in the required `typecheck` command. Related non-major API model and Oxc updates are reviewed with their coupled evidence. ## Lint contract `format:check` runs the installed Stack Toolchain CLI through the source-owned repository command catalog on the qualified Node runtime. Both `check` and `check:fast` require it before lint. It checks the full configured format scope and its exact frozen-artifact exclusions without rewriting files. Frozen exclusions name individual artifact files, including historical transaction envelopes, original portable v3 profiles and historical execution schemas used as byte-identity evidence. Preserve their recorded bytes and digest assertions; formatting their JSON or YAML changes the evidence. Active TypeScript remains in scope. Test fixture transformations must tolerate formatter-owned whitespace in mutable input profiles. The four formatted source directories and two root configuration files use LF in Git checkout, including on Windows with `core.autocrlf=true`. Directory rules retain automatic binary detection; later explicit raw-fixture overrides keep their original bytes. The checkout regression checks staged and checked-out bytes, raw and binary preservation, and an ungoverned CRLF control. This is repository-owned checkout policy. Oxlint is the only JavaScript/TypeScript linter until a concrete missing rule proves that ESLint is required. The published presets enable correctness, suspicious, import, promise, Node, Unicorn, Oxc, and type-aware TypeScript rules. Stack Toolchain publishes opt-in production and test maintainability presets. Foundation dogfoods the production profile and applies the documented relaxed profile to tests, fixtures, the packed-consumer harness, and spikes. Generated and vendored paths are excluded from the five budgets without disabling unrelated lint rules; dependency and build output is ignored. Consumers own their path mapping and enable the presets only in a dedicated reviewed adoption change. `typeCheck` remains disabled in Oxlint. The pinned TypeScript 7 compiler is the single type-error authority, preventing duplicate and inconsistent diagnostics. ESLint disable comments do not suppress foundation rules, and unused Oxlint disable directives are errors. ## Architecture contract Every governed source file must belong to a consumer-owned opaque boundary. Each boundary declares its allowed boundary, package, builtin, and non-literal runtime-reference edges. Workspace package identity, dependency declarations, and export surfaces come from package manifests rather than duplicated YAML. The gate is fail closed: new unclassified files, parser errors, cross-package relative imports, undeclared packages, blocked exports, and unresolved imports fail CI. The repository dogfoods separate application, contract, adapter, and composition boundaries for every implemented capability. The source-dependency schema requires explicit target entrypoints and rejects runtime or type-only dependency cycles between packages and architecture boundaries. The repository dogfood uses source-dependencies v2 and `packageRoots: [packages]`. The explicit package-root contract, rather than pnpm selection globs, closes package and source ownership: a new direct child package, a source outside governed roots, or a boundary spanning package roots fails the gate. The package inventory test independently proves that every public workspace manifest appears in the existing public API, release, and registry artifact-qualification authorities without maintaining another package catalog or release graph. Suppression waivers, released API baselines, privileged workflow jobs, and publishable packages are also closed-world evidence. Released contract and API baselines are release-owned: creation, replacement, movement, and deletion are forbidden in a normal pull request. Contract baselines use the stable `architecture/contracts/` root; accepted ADR history uses the single `architecture/decisions/accepted-decisions.json` anchor. ## Conformance The test suite includes positive and negative capability fixtures, real lint failures, local attach/detach recovery, parser parity, ast-grep rule tests, and a packed-tarball consumer. The tarball consumer installs its own exact Oxlint, oxlint-tsgolint, and TypeScript versions and proves the published type-aware preset, the source graph, documentation links and anchors, idempotent ADR baseline promotion, and both contract-evolution capabilities. Linux CI separately runs the real Aqua-pinned Buf capability-qualification E2E because the normal Buf capability checks are intentionally process-free. The E2E proves compatible and breaking `FILE` behavior plus rejection of modified committed evidence after a fresh Buf rerun. The tarball is extracted and searched for a source-owned secret canary. Linux CI also emits an SPDX JSON SBOM after Dependency Review succeeds. That tarball check qualifies package contents and packed-consumer behavior, but does not prove publication through an npm-compatible registry. Release runs a separate hermetic registry publish/install gate with network uplinks disabled. The static `repository.security-baseline` capability does not manufacture equivalent evidence for a consumer; each publishing consumer needs its own real packed- artifact gate until a separate reusable package capability is accepted. ## Permission-sensitive test environments Run filesystem refusal tests in disposable repositories under a process that respects file permissions. Linux root with `CAP_DAC_OVERRIDE` can write into a `0500` directory, so a chmod-based `EACCES` scenario cannot qualify that refusal under those privileges. Prefer an unprivileged test process. A Linux root test runner can remove `dac_override` and `dac_read_search` from its capability bounding set for the test subprocess; verify an actual denied write in a fresh temporary directory first. Keep production permissions and host Git hooks intact. An interrupted test runner has no successful aggregate result. Preserve its log and exact source identity, complete the interrupted file and remaining files, and rerun only failed scopes when diagnosing environment-specific failures. Record each resumed command separately; platform skips and partial reruns do not establish full-suite, supported-platform or release qualification. ## Private combined artifact qualification ### Native package type qualification `scripts/check-publishable-packages.mjs` applies publint and the private native TypeScript 7.0.2 qualifier to every package in the owner-derived publication projection. Each check packs its actual staged package with lifecycle scripts disabled. Markdown publication staging remains shared with registry and release qualification. The native compiler reads only the inspected archive through a closed virtual filesystem; checkout files cannot repair missing packed files. The admitted package contract is explicit: `type: module`, typed exports with exactly a first `types` condition followed by `import`, and JSON data exports or bounded JSON wildcards. Every typed export must resolve to its exact declaration target in both Node16 ESM and Bundler modes. Every packed code file must use ESM format and explicit import/export syntax under `dist`; native observations cover JavaScript and declarations. Valid syntax-free ESM, including files with only side effects, is outside this current compiled-package domain. Relative, self-package and `#` imports must resolve to real packed files, and JavaScript runtime references must separately identify packed JavaScript or JSON rather than just a declaration sibling. Exact exports take precedence over bounded JSON wildcard self-imports; overlapping wildcard subpath domains reject. Legacy resolution fields, alternate condition graphs, CommonJS files, nested package scopes, unsupported declaration export forms and unrecognized code layouts reject. These executable exclusions remove the CommonJS premises of the former ATTW interoperability checks. The former `esm-only` policy did not claim CommonJS-consumer support; the native qualifier makes no such claim either. Focused fixtures retain the twelve former problem-class premises, including missing types, fallback targets, format disagreement and internal resolution. This is a bounded ESM package qualifier, not a general ATTW compatibility layer or a replacement for the separately required complete declaration typecheck. ### Historical published operations The mandatory published compatibility route installs exact-SRI Foundation `0.11.0`, `0.12.0` and `0.14.0` with lifecycle scripts disabled. Its private ordinary TypeScript driver calls their unchanged public scaffolding and local mode operations, using the same composition as each published CLI. It retains the canonical and orphan-temporary transaction barriers, actual Plan/Receipt and output-byte comparisons, and unsupported schema-v3 status and mutation refusals. Current candidate CLI qualification remains separate and required. These are explicitly **published operation-boundary** observations. They do not qualify old CLI startup, argument parsing, stdout rendering or process exit codes. Those old monolithic CLIs import a compiler below the repository's TypeScript 7.0.2 floor. The driver inspects each installed public import closure as data before evaluation and admits the original dormant computed import only at its exact path and content hash. A deny-only runtime hook rejects compiler and API Extractor loading, including aliases and realpaths, before evaluation. It never replaces modules or results, and a caught denial still fails the qualification. Separate managed-restoration obligations that require an actual historical CLI retain their own existing actual-CLI scenarios. All new tooling and safety tests belong to the required strict TypeScript project and complete Linux and Windows test inventories. Negative synthetic fixtures test the driver's refusal behavior; the positive compatibility oracle is the unchanged published implementation. ### Shared packed and registry artifacts `pnpm package:qualification:built` prepares and checks publishable manifests, then runs the full packed and hermetic-registry consumers sequentially against one process-local qualified artifact set. The Linux registry wrapper uses it; standalone `package:check:built` and `registry-install-e2e:built` each produce a fresh set. Windows jobs retain their independent qualification scopes. Windows packed qualification uses three fresh groups: `integration` retains documentation rollback/history, consumer E2E, authority, local mode, agent and quality-gate reporting; `sdk-growth` retains SDK growth qualification; `quality-coverage` retains coverage qualification. Registry qualification uses `npm-docs`, `pnpm-docs` and `foundation`, retaining both documentation profiles for each package manager and the installed Foundation consumer. All matrix members remain required by `windows-check`; default local commands and the Linux qualification paths still execute the full consumer inventory. Darwin uses three closed paired profiles: `foundation` runs packed `integration` then registry `foundation`; `npm-docs` runs packed `sdk-growth` then registry `npm-docs`; `pnpm-docs` runs packed `quality-coverage` then registry `pnpm-docs`. Each profile produces its own complete six-package A/B set and consumes it in the same guarded packed-before-registry lifetime. Their union retains every original consumer phase exactly once. The fail-closed required `macos-qualification` aggregate includes every profile and the separate native controls, QGR lifecycle, repository mutation, scaffolding and document-writing job. No archive authority crosses jobs. Zero-argument local qualification retains its complete sequence. Linux registry qualification starts directly after Dependency Review; its independent fresh consumer does not depend on the repository static check. Other package and Windows registry jobs wait for their platform's short static job. Each qualification still runs its own fresh installation and complete required consumer scope. Windows consumer groups have a 50-minute bound, preserving the existing release attester's maximum CI path when combined with the 15-minute static gate. Each fresh production prepares at most two independent package targets at once. Their staging trees are separate, both clean builds remain required per target, and returned records retain catalog order. Failure stops new target admission and drains every started target before cleanup; no archive authority is shared between matrix jobs. Every group produces the complete six-package set. Every target still requires two independent clean builds and the existing artifact conformance checks. Reuse preserves the producer's retained verified bytes, exact package membership, names, versions, SHA-256 and SHA-512 integrity. Physical custody rejects symlink traversal, hardlink aliases, inode replacement, missing and extra snapshots. It accepts neither caller archive paths nor serialized or copied handles, and cannot share authority across CI jobs. Source and toolchain identity is freshly checked before and after production, at each whole consumer stage boundary, and before final acceptance. Inner phase checkpoints verify snapshot custody without repeating the entire source walk. Source drift during packed qualification rejects before registry effects; drift during registry qualification rejects its final acceptance. No stage may start after owner completion or failure; admitted child work drains before cleanup, and consumer or cleanup failures prevent PASS. This is a private repository qualification mechanism within the existing artifact boundary, not a public module contract or general reusable runtime. The deliberate packed rollback mutation uses a separate TEST archive; it never changes the qualified snapshot passed to the registry consumer. Clean-stage materialization admits up to four regular-file leaf jobs and drains all admitted jobs before reporting failure. Directories, symlinks, build order and each target's independent A/B stages remain serial within their owners; two package targets can still prepare independently. Stable reads reserve outstanding bytes before allocation, commit successful bytes synchronously and release failed reservations. Existing per-state 256 MiB and entry/depth/member bounds, source identity brackets, external ancestor probes, nearest dependency resolution, archive equality and downstream custody checks remain enforced. Ancestor package-name probes are bounded independent I/O, with no cached absence or source/dependency tree reuse. This private scripts concern introduces no product module boundary, capability contract or CMS adoption change. ### Trusted owner merge operation This is the optional stricter path for a change whose review ran as a hosted job. Without `ci:merge`, perform the revalidation described above (live PR head/base, complete native evidence and the recorded independent review), then run `merge-owner-pr.mjs` directly with `--expected-head`. Invoke the reviewed, pinned operator tool from outside the candidate checkout, with a trusted Node binary and without `NODE_OPTIONS` or `NODE_PATH` injection: ```bash node /trusted/pinned/scripts/merge-reviewed-pr.mts \ --pr 123 --review-job REVIEW_JOB --review-host workers-fsn1-01 \ --review-registry /srv/worker-state/jobs/engineering-foundation/hardening-20261001/registry \ --expected-head HEAD_SHA --expected-base-ref main --expected-base BASE_SHA \ --subject 'fix(ci): qualify final source' --body-file /trusted/intent.txt ``` `ci:merge` requires one independently produced hosted GPT-6.1/xhigh/default terminal PASS bound to the exact source, base ref/SHA and workflow blob. Construct its job prompt with `readMergeReviewInput` and `renderMergeReviewPrompt`; a caller supplied JSON file, ReviewRouter context or candidate Actions status cannot replace that receipt. The protected collector reads only the admitted host's root-owned manifest, prompt and result. A separate unprivileged collector hashes actual source files against the GitHub commit's complete tree, without executing candidate Git configuration. Extra files, missing bytes, changed modes and unbound metadata reject admission. Review jobs must keep a clean physical source tree and run no build or dependency bootstrap there. The operation also checks all 34 mandatory current native jobs, not just the four aggregate names; the shadow classifier remains advisory. It then invokes the organization owner guard pinned at `c8f3e7ba220241f79292c84c72712653019aa1df`, preserving owner identity and the expected-head merge comparison. Body bytes are frozen before external IO. GitHub required checks still apply. This is an admitted operator path, not a GitHub-wide prohibition on another merge client. GitHub Free cannot require our trusted workflow, and GitHub exposes no atomic expected-base/ref comparison: retargeting after the final read can only be detected after merge.