From c8430680afbc78f32c30fd15f1ef6a185f968b00 Mon Sep 17 00:00:00 2001 From: Mr-X Date: Mon, 23 Nov 2026 19:12:16 +0000 Subject: [PATCH] feat(aer1): verify chain, commitment and workflow timelines MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three families leave not_checked and are now judged vector by vector against the pinned corpus: - chain v1 (7): entry digest over the decoded bytes, genesis, links, and close true only on the last entry. - chain -07 (28): the entry digest that binds prev_digest, seq, job_id, close, id, tool, provenance_class and the output commitment, serialized as canonical JSON (keys by code point, RFC 8259 escaping, non-ASCII as \uXXXX). - commitment (8): job, length, final entry digest and publication time, with the fractional entry_count spelling refused because 5.0 is a different claim from 5 even though JSON parses both to 5. - workflow Merkle (8): both constructions under the declared merkle_version — receipt-id-v0 leaves and seq-output-v1 "seq:output_hash" leaves — with the odd-level last-duplication rule. An unknown version is a refusal, never a guess. Table: agree 94 (was 43), false accepts 0, false rejects 0, not checked 49 (was 100). Every family gets a test that runs the whole pinned family, so a weak rule surfaces as a false accept and a strong one as a false reject. 🤖 Generated with Codebuff Co-Authored-By: Codebuff --- AGENTS.md | 2 +- README.md | 6 +- docs/AER1-INTEROP-TABLE.md | 16 +- docs/ARCHITECTURE.md | 2 +- docs/COMMUNITY.md | 4 +- docs/EVIDENCE-MATRIX.md | 2 +- docs/EXECUTIVE-SUMMARY.md | 4 +- docs/FUNDING.md | 2 +- docs/GRANT-APPLICATION-CORE-DAO.md | 2 +- docs/GRANT-APPLICATION-PI-NETWORK.md | 2 +- docs/HOW-TO-EVALUATE.md | 4 +- docs/LINKEDIN-CONTENT.md | 6 +- docs/MARKETING-PLAN.md | 4 +- docs/NUMBERS.html | 4 +- docs/PITCH-DECK.md | 2 +- docs/PRODUCTION-ROADMAP.md | 2 +- docs/ROADMAP-4MONTH.md | 2 +- ...46-RFP2-XDR-AUDIT-SUBMISSION-2026-11-13.md | 4 +- docs/SCF-BUILD-APPLICATION-V2.md | 2 +- docs/SCF-BUILD-APPLICATION.md | 6 +- docs/SCF-INTEREST-FORM-2026-11-16.md | 2 +- docs/STATUS.md | 42 ++-- docs/STELLAR-KILLER-FEATURES.md | 2 +- docs/TRINITY-CORE-STELLAR-PI.md | 2 +- docs/TWITTER-CONTENT.md | 8 +- docs/claims-registry.json | 4 +- docs/numbers.json | 4 +- .../NPM-PUBLISH-READINESS-AND-STEPS.md | 2 +- docs/state-snapshot.json | 4 +- index.html | 2 +- packages/agent-commerce/aer1.mjs | 230 ++++++++++++++++++ scripts/aer1-interop.mjs | 118 +++++++-- test/integrations/aer1-interop.test.mjs | 15 ++ .../aer1-timeline-checks.test.mjs | 109 +++++++++ 34 files changed, 531 insertions(+), 91 deletions(-) create mode 100644 test/integrations/aer1-timeline-checks.test.mjs diff --git a/AGENTS.md b/AGENTS.md index 2681e34..35f6e25 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -158,7 +158,7 @@ New entries append chronologically and are never renumbered — a gap in the tag ## Files That Change Together -- `H1-H8.md` expected numbers ↔ engine version ↔ `npm test` test counts ↔ validator check count (currently 2.1.2 ↔ 16 ↔ 2009 ↔ 649 - the npm test number tracks the latest measured count; every literal here is a measured number, so a green run that disagrees means the number below is stale, not that the run is wrong). +- `H1-H8.md` expected numbers ↔ engine version ↔ `npm test` test counts ↔ validator check count (currently 2.1.2 ↔ 16 ↔ 2013 ↔ 649 - the npm test number tracks the latest measured count; every literal here is a measured number, so a green run that disagrees means the number below is stale, not that the run is wrong). - `freeze-record-4.2.6.json` ↔ any file it pins ↔ `.gitattributes` tree list ↔ README pin-count claim (now 49 = 30+19; README.md's own pin is inside the record it links from). Take the split from the record itself, never from a remembered literal — the "47 = 28+19" figure that stood here for several cycles was two pins stale, and `test/verifier-c/validate-freeze.test.mjs` had the same class of rot frozen into its own header comment (it advertised `46/46` while the record held 49; the assertions were already deriving the number, only the documentation lied). The dashboard's `#payout` section is bilingual per the AGENTS.md i18n pattern: its `test/p2/governance-dashboard-i18n.test.js` contract keeps the EN markup defaults and the AR dictionary structurally paired — edit one side only and the pairing check fails by name. - Bilingual dashboard pair ↔ AGENTS.md i18n pattern above ↔ the EN mirror (`coreguard-gate41-visual-en.html`) — regenerate the dictionary by structural pairing after ANY structural edit to either file. **Correction to an invariant that does not exist: the "637/637 node pairing" cited here for several cycles is dead** — no file, test, or script derives or checks 637. What is genuinely enforced is narrower and real, in two places. **(1) `docs/GOVERNANCE-DASHBOARD.html`** — `test/p2/governance-dashboard-i18n.test.js` binds the `PAYOUT_GATE_I18N` dictionary to that section's `data-i18n` markup (**11 keys**: every key present exactly once, no unused keys, EN/AR inline-tag sequences equal, tags balanced, AR values carrying Arabic). **(2) `docs/coreguard-gate41-visual.html`** — `test/p2/gate41-visual-i18n.test.js` pins that page's one runtime dictionary `D = {"nodes": {"": {ar, en}}, "attrs": …}` as a **bijection** against the markup: **277 static `data-i18n` keys ↔ 277 entries**, 0 missing, 0 orphan, every entry carrying a non-empty `ar` and `en`, no `.en` leaking Arabic, and `apply()` itself asserted to still iterate `D.nodes` and select by the iterated key (data can be perfect while the switcher no longer reads it — the [C27] two-channel trap). Two measured facts that look like defects and are **not**: entries 84/93/104 have an `.ar` with no Arabic because they are the bare RTL arrows `←`/`→`, and **29** entries embed a *nested* `data-i18n` inside their own `.ar` value (the outer entry replaces `innerHTML`, so the inner attribute is redundant and order-dependent, yet every inner key also appears in static markup so nothing is orphaned and the page renders correctly) — the count is **pinned, not asserted zero**, because changing it is a deliberate edit to a live investor-facing page. **(3) the EN sister `coreguard-gate41-visual-en.html` itself** — this was the last unguarded piece, and `test/p2/gate41-visual-en-parity.test.js` now closes it. The invariant is **NOT** "the two files are identical" — measured, they are not, and asserting it would be another dead number like 637. The AR page is the *interactive* twin (language switcher); the sister is the *printable* twin (printhead + print button), which is exactly why [C5]'s dictionary walk dropped the EN `printhead` subtree first. So the contract pins (a) **all 277 dictionary `.en` values appear verbatim in the sister** — the cross-file link, 0 absent; (b) **load-bearing element counts are identical** (section 10 · h1 1 · h2 10 · h3 12 · h4 5 · table 4 · thead/tbody 4 · tr 30 · ul 5 · li 10 · a 14 · p 19 · button 3 · ids 34) — a row or heading that exists in one twin only means the sister is a stale snapshot, invisible to any per-file test; (c) the **only** permitted tag differences are `b`/`span`/`div` each **+1** in the sister, pinned as a set and re-checked against the presence of the `printhead` that causes them, so a new divergence cannot hide beside a sanctioned one; (d) the sister **stays dictionary-free** (0 `data-i18n`, 0 `D.nodes`, 0 `L(`) — it is literal English, and a second dictionary would be a second source of truth ([C27]); (e) the sister leaks **no Arabic** in any of its 539 text runs; (f) `lang="ar" dir="rtl"` vs `lang="en" dir="ltr"` — the one attribute pair that *should* differ, and wrong `dir` reverses the whole board's order while every text assertion still passes; (g) the role asymmetry is pinned as fact, so nobody "fixes" it and nobody lets it rot. One consequence worth knowing: **221 of the 277 `.ar` values are already literal Arabic in the static markup**, so the AR page renders with JS disabled — the dictionary is the *switcher's payload*, not its only source of text, and that count is pinned so stripping the literal text (a silent availability regression every dictionary assertion would pass) cannot land unnoticed. 12 negative controls, and the battery reports **coverage, not just a count**: all 8 tests were observed failing (the extractor needs `--test-reporter=tap`, because the default reporter prints glyphs and an ASCII `not ok` filter finds nothing). - `verification/cg-assurance-verify.ps1` self-test count (21) ↔ `selftest.tap` frozen bytes ↔ README/STATUS claims (21/21). diff --git a/README.md b/README.md index 3b7da81..12d2793 100644 --- a/README.md +++ b/README.md @@ -292,7 +292,7 @@ Then: **[Developer quickstart](docs/DEVELOPER-QUICKSTART.md)** (three calls) · | Independent Verifier | SHIPPED | JS / Rust-WASM / Python verifiers. Trust never depends on us running a hosted check. | مُحققات JS و Rust-WASM و Python. الثقة مش معتمدة إننا نشغّل فحص عندنا. | | Badge Shield | SHIPPED | Embeddable verification badges rendered only from anchored manifests. | شارات تحقق تتحط في أي موقع، بتطلع بس من بيانات متثبّتة على السلسلة. | | ★ PSAR/1 Pre-Sign Authorization Receipts | SHIPPED | A Stellar transaction carries its own authorization proof before any signature — PASS / BLOCK, bound to the exact XDR bytes. 37 tests; v1 does not semantically decode XDR. | معاملة Stellar بتشيل إثبات التصريح بتاعها قبل أي توقيع — PASS أو BLOCK، مربوطة بنفس بايتات المعاملة بالظبط. 37 اختبار؛ والإصدار الأول مش بيفك محتوى XDR دلاليًا. | -| ★ Agent Commerce Security — AC-FW/1 · CGCR/1 · AGR/1 | SHIPPED | Agent authorization firewall, verifiable consent receipts and risk engine — SDK, MCP server and REST API. 2009/2009 tests, offline and fail-closed. | جدار تفويض للوكلاء، وإيصالات موافقة قابلة للتحقق، ومحرك مخاطر — SDK وخادم MCP وREST API. ‏2009/2009 اختبار، دون اتصال ورفض آمن. | +| ★ Agent Commerce Security — AC-FW/1 · CGCR/1 · AGR/1 | SHIPPED | Agent authorization firewall, verifiable consent receipts and risk engine — SDK, MCP server and REST API. 2013/2013 tests, offline and fail-closed. | جدار تفويض للوكلاء، وإيصالات موافقة قابلة للتحقق، ومحرك مخاطر — SDK وخادم MCP وREST API. ‏2013/2013 اختبار، دون اتصال ورفض آمن. | | CGXA/1 + CGXA-SOROBAN/1 — Execution Attestation | DRY_RUN | Offline attestation of the approval↔execution arc with Soroban consent-binding preparation. No broadcast; on-chain action is owner-gated. | شهادة دون اتصال لمسار الموافقة↔التنفيذ مع تجهيز ربط الموافقة على Soroban. بدون بث؛ التنفيذ على السلسلة بقرار المالك. | | Trust Gate · Labs · Verify Bot | RESEARCH | Investor portal (TRUST.md) live; CoreGuard Labs evidence lab DRAFT; Telegram/Discord verify bot PLAN_ONLY. | بوابة المستثمر (TRUST.md) شغالة؛ معمل الأدلة CoreGuard Labs مسودة؛ بوت التحقق لسه خطة. | | @coreguard/sdk + CLI | GATED | Two-line SDK integration and `npx coreguard demo`. 13-package npm closure, release-gated. | دمج في سطرين و`npx coreguard demo`. 13 حزمة npm بانتظار بوابة الإصدار. | @@ -349,7 +349,7 @@ Run the offline arc: `npm run stellar:presign` — no signing, no wallet, no net ### Recent developments — Nov 10–14 2026 (by network, measured & evidenced) -> Canonical measured state for this cycle: **2009 / 2009 tests**, **1420 files scanned / 0 violations**, **docs-node 133 executed · 82 skip-listed · 30 covered**, **Foundry 43/43 pass** — [docs/state-snapshot.json](docs/state-snapshot.json) · [docs/STATUS.md](docs/STATUS.md). Every item below is labeled by its committed evidence; nothing implies revenue, customers, partnerships, external adoption, or a third-party audit. +> Canonical measured state for this cycle: **2013 / 2013 tests**, **1420 files scanned / 0 violations**, **docs-node 133 executed · 82 skip-listed · 30 covered**, **Foundry 43/43 pass** — [docs/state-snapshot.json](docs/state-snapshot.json) · [docs/STATUS.md](docs/STATUS.md). Every item below is labeled by its committed evidence; nothing implies revenue, customers, partnerships, external adoption, or a third-party audit. #### Stellar — pre-sign receipts, agent-gate envelope path, Freighter evaluation, DEX integration @@ -726,7 +726,7 @@ CoreGuard answers one question with evidence: **did this execution conform to wh npm install # 2. Test + benchmark -npm test # 2009 tests (machine-pinned) — canonicalization, policy, tamper, anchor, verifier, P1/P2, provenance, pricing, encoding, attack-lab, DDE delivery/dispute suites (incl. doc-curl contract), pages-settle guard, verification-platform suite, executed-evidence contract (agent gate · real-book DEX gate · universal shield · first funded signed mainnet swap), the PSAR/1 pre-sign receipt suite (offline PASS/BLOCK demo), owner-authorized deploy battery +npm test # 2013 tests (machine-pinned) — canonicalization, policy, tamper, anchor, verifier, P1/P2, provenance, pricing, encoding, attack-lab, DDE delivery/dispute suites (incl. doc-curl contract), pages-settle guard, verification-platform suite, executed-evidence contract (agent gate · real-book DEX gate · universal shield · first funded signed mainnet swap), the PSAR/1 pre-sign receipt suite (offline PASS/BLOCK demo), owner-authorized deploy battery git config core.hooksPath .githooks # install the Pages settle pre-push guard — every main push waits for the Pages build npm run corpus # deterministic 73-scenario adversarial corpus npm run benchmark # 73/73 pass diff --git a/docs/AER1-INTEROP-TABLE.md b/docs/AER1-INTEROP-TABLE.md index e256690..52d76cd 100644 --- a/docs/AER1-INTEROP-TABLE.md +++ b/docs/AER1-INTEROP-TABLE.md @@ -10,10 +10,10 @@ A `verified` outcome here means the saved bytes were not changed after they were | Outcome | Vectors | |---|---| -| agree with the corpus | 43 | +| agree with the corpus | 94 | | **false accept (ours — must be zero)** | **0** | | false reject (ours) | 0 | -| not checked (unimplemented family, schema or anchor) | 100 | +| not checked (unimplemented family, schema or anchor) | 49 | ## Families and the joined verdicts @@ -22,12 +22,12 @@ Two columns from two runners against the same pinned set, joined on vector name. | Family | Vectors | CG-AER1/1 | Reference kit | Divergence | |---|---|---|---|---| | `invalid` | 36 | 27 agree · 9 not checked | 36 checks, all as expected · 36 refused | 0 of 27 | -| `chain` | 35 | 0 agree · 35 not checked | 35 checks, all as expected | — (not judged by CG-AER1/1) | +| `chain` | 35 | 35 agree | 35 checks, all as expected | — (kit line carries no per-vector verdict) | | `valid` | 21 | 9 agree · 12 not checked | 21 checks, all as expected | 0 of 9 | | `merkle` | 9 | 0 agree · 9 not checked | 12 checks, all as expected | — (not judged by CG-AER1/1) | | `anchor` | 8 | 0 agree · 8 not checked | 8 checks, all as expected · 4 refused | — (not judged by CG-AER1/1) | -| `commitment` | 8 | 0 agree · 8 not checked | 8 checks, all as expected | — (not judged by CG-AER1/1) | -| `workflow-merkle-seq-output-v1` | 8 | 0 agree · 8 not checked | 8 checks, all as expected | — (not judged by CG-AER1/1) | +| `commitment` | 8 | 8 agree | 8 checks, all as expected | — (kit line carries no per-vector verdict) | +| `workflow-merkle-seq-output-v1` | 8 | 8 agree | 8 checks, all as expected | — (kit line carries no per-vector verdict) | | `id-binding` | 6 | 6 agree | 6 checks, all as expected | 0 of 6 | | `anchored` | 6 | 0 agree · 6 not checked | 6 checks, all as expected · 5 refused | — (not judged by CG-AER1/1) | | `unicode` | 5 | 0 agree · 5 not checked | 5 checks, all as expected | — (not judged by CG-AER1/1) | @@ -51,7 +51,7 @@ Drift named by CG-AER1/1: |---|---| | Corpus | kit 1.5.7 · `sha256:60bf73f325793e16843370cfa24903bb0d017525cb297e42bebc35857e2db0d2` · 143 vectors | | Reference kit run | commit `e04e4c91d4630a2e0ceb4e12c48accacac10155e` · column sha256 `sha256:eb6cec8cf8d927c6af0460913fbf82ae1e2ae021b2cdde295b4d7c3aa4b29cd9` · 146 checks | -| CG-AER1/1 | parser sha256:5d74ff8126fab46509875e86c1faa3c8a53389f18d695e2f34681f55123b6bb1 · generator sha256:66b2f0e383f8b331f456db269359155e5c2756c05a9eef89c13b3585916d5edc | +| CG-AER1/1 | parser sha256:39527a89971a6f128bfc8139b726c7fe12cceba9163589b9bf586e110c7e877c · generator sha256:420e12c887ddce8fd18e01addd6a704b3dd6cc02efd6c35824d741ace0b35de0 | The kit's closing line is `CONFORMANCE OK: 143 vectors, 146 checks, sha256:60bf73f325793e16843370cfa24903bb0d017525cb297e42bebc35857e2db0d2`; the join key is the vector name, and the extra checks are the merkle family's workflow checks (9 vectors carry 12 checks). The kit column was published at https://github.com/zambodotdev/aer1-kit/blob/main/interop/kit-column-2026-11-23.txt and is vendored here so this page regenerates offline; its sha256 is checked before the column is read. @@ -65,12 +65,12 @@ None. ## Not checked -- 73 — timeline families (chain / commitment / merkle / anchor) +- 22 — timeline families (chain / commitment / merkle / anchor) - 27 — records (unsupported schema) ## Boundary -- No conformance claim: 0 false accepts and 100 not-checked vectors are listed above. +- No conformance claim: 0 false accepts and 49 not-checked vectors are listed above. - The id-binding family is judged end to end and agrees 6/6. - The single-record invalid set is now refused by: duplicate member names, unknown provenance class, an execution payload without inputs, a claimed status other than verified, and the canonical base64 and calendar checks. - `not_checked` is a resource outcome, not a pass. diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 1aa2b9e..19287d6 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -42,5 +42,5 @@ Publisher/human judgment can feed in as input, but the **hold is enforced by the - **Playground (live):** [https://eslam-x.github.io/coreguard/PLAYGROUND.html](https://eslam-x.github.io/coreguard/PLAYGROUND.html) - **Demo:** `node demo.mjs` -- **Tests:** 2009 / 2009 passing • Boundary audit PASS · Release gate GATE_PASS +- **Tests:** 2013 / 2013 passing • Boundary audit PASS · Release gate GATE_PASS - **One-Pager:** [ONE-PAGER.md](ONE-PAGER.md) diff --git a/docs/COMMUNITY.md b/docs/COMMUNITY.md index 60136cd..6e2093a 100644 --- a/docs/COMMUNITY.md +++ b/docs/COMMUNITY.md @@ -29,7 +29,7 @@ issue on the faucet**, not to our environment alone. (Confirmed by probing: > I'm building **CoreGuard**, an open-source, Core-native execution-verification > layer. The v0.1 implementation is public and CI-green: > -> • 2009 / 2009 tests +> • 2013 / 2013 tests > • 73/73 adversarial benchmarks > • a staged, funding-gated Core Testnet2 validation campaign > • deterministic trace normalization @@ -89,7 +89,7 @@ moderator). Fill-ready answers (adjust to whatever the form actually asks): |---|---| | Wallet address (tCORE2) | `0x6cB4796D54ED72105ec617c8850C91972a0d9469` | | GitHub / project URL | `https://github.com/coreguard-global/CoreGuard` | -| Reason (technical, no marketing) | I am developing CoreGuard, an open-source verification infrastructure project for Core-native Bitcoin DeFi. I need Testnet2 tCORE2 to deploy and test the EvidenceRegistry contract and perform on-chain proof anchoring. The project already has a public GitHub repository, 2009 / 2009 tests and 73/73 benchmarks, a deterministic trace/evidence pipeline, local fork-based anchoring, and a reproducible CI pipeline. The remaining integration step is a real Testnet2 deployment and on-chain anchorProof transaction, pending testnet funding. I need additional testnet funds to repeatedly deploy, test, and verify the contract under realistic conditions, including failed/tampered proof cases and independent verification. | +| Reason (technical, no marketing) | I am developing CoreGuard, an open-source verification infrastructure project for Core-native Bitcoin DeFi. I need Testnet2 tCORE2 to deploy and test the EvidenceRegistry contract and perform on-chain proof anchoring. The project already has a public GitHub repository, 2013 / 2013 tests and 73/73 benchmarks, a deterministic trace/evidence pipeline, local fork-based anchoring, and a reproducible CI pipeline. The remaining integration step is a real Testnet2 deployment and on-chain anchorProof transaction, pending testnet funding. I need additional testnet funds to repeatedly deploy, test, and verify the contract under realistic conditions, including failed/tampered proof cases and independent verification. | | How many tokens do you need? | 20–50 tCORE2 — deploy EvidenceRegistry once, then repeated integration + adversarial (tampered/failed proof) anchoring and independent on-chain verification. | Verifiable on request: the repo, CI, benchmarks, and the local fork anchor diff --git a/docs/EVIDENCE-MATRIX.md b/docs/EVIDENCE-MATRIX.md index d589691..5fe8eac 100644 --- a/docs/EVIDENCE-MATRIX.md +++ b/docs/EVIDENCE-MATRIX.md @@ -96,7 +96,7 @@ today and cannot adopt the latter today. ## Totals -Suite total: **2009 / 2009 pass**, machine-pinned in +Suite total: **2013 / 2013 pass**, machine-pinned in `docs/state-snapshot.json` (the only authoritative count in the repo). Boundary audit: **0 violations**; file count lives in the same snapshot. diff --git a/docs/EXECUTIVE-SUMMARY.md b/docs/EXECUTIVE-SUMMARY.md index 21cedc1..81518dd 100644 --- a/docs/EXECUTIVE-SUMMARY.md +++ b/docs/EXECUTIVE-SUMMARY.md @@ -25,7 +25,7 @@ CoreGuard is a fail-closed execution-truth layer for agent-to-agent jobs. Money | Item / العنصر | Value / القيمة | Source / المصدر | |---|---|---| -| **Test suite / مجموعة الاختبارات** | **2009 / 2009 PASS (measured)** | [`npm test`](../package.json) · [`state-snapshot.json`](state-snapshot.json) | +| **Test suite / مجموعة الاختبارات** | **2013 / 2013 PASS (measured)** | [`npm test`](../package.json) · [`state-snapshot.json`](state-snapshot.json) | | **Boundary audit / تدقيق الحدود** | **1312 files · 0 violations** | [`npm run boundary:audit`](../package.json) | | **Claims audit / تدقيق الادعاءات** | **28 claims · VERIFIED 16 · 0 violations** | [`npm run claims:audit`](../package.json) · [`claims-registry.json`](claims-registry.json) | | **Docs-node contract / عقود التوثيق القابلة للتنفيذ** | **133 executed · 82 skip-listed · 30 docs covered** | [`../test/ci/docs-node-contract.test.js`](../test/ci/docs-node-contract.test.js) | @@ -66,7 +66,7 @@ node demo.mjs ``` **Expected / المتوقع:** -- `npm test` → **2009 / 2009 pass, fail 0** +- `npm test` → **2013 / 2013 pass, fail 0** - `node demo.mjs` → shows **`UNKNOWN → HELD`** - `npm run claims:audit` → **CLAIM-AUDIT: PASS** - `npm run release:gate:independence` → **GATE_PASS** diff --git a/docs/FUNDING.md b/docs/FUNDING.md index c7dc5a3..c100ddb 100644 --- a/docs/FUNDING.md +++ b/docs/FUNDING.md @@ -43,7 +43,7 @@ CoreGuard is Core-native by design: ## Why us - **We already built it.** Not a pitch deck — a deterministic, tested, - adversarially benchmarked engine. **2009 / 2009 tests, + adversarially benchmarked engine. **2013 / 2013 tests, 73/73 adversarial benchmarks, anchor integrity VERIFIED live on Core Mainnet** (authoritative numbers: [`docs/STATUS.md`](STATUS.md)), and a staged Testnet2 hardening campaign (controlled validation) diff --git a/docs/GRANT-APPLICATION-CORE-DAO.md b/docs/GRANT-APPLICATION-CORE-DAO.md index 9c609d5..c906b9b 100644 --- a/docs/GRANT-APPLICATION-CORE-DAO.md +++ b/docs/GRANT-APPLICATION-CORE-DAO.md @@ -15,7 +15,7 @@ CoreGuard is a verifiable execution truth layer for Bitcoin DeFi. It produces in CoreGuard produces cryptographic evidence of conformance that can be independently replayed and verified. It works across Core DAO, Stellar, and Pi Network. ### 4. Traction -- ✅ 2009 tests passing (machine-pinned) +- ✅ 2013 tests passing (machine-pinned) - ✅ 1312 files, 0 boundary violations - ✅ 10,000-run benchmark: 0 false accept, 0 false reject - ✅ Core DAO mainnet: 2 contracts deployed & verified diff --git a/docs/GRANT-APPLICATION-PI-NETWORK.md b/docs/GRANT-APPLICATION-PI-NETWORK.md index 74df424..6f2979a 100644 --- a/docs/GRANT-APPLICATION-PI-NETWORK.md +++ b/docs/GRANT-APPLICATION-PI-NETWORK.md @@ -24,7 +24,7 @@ CoreGuard on Pi Network: ### 4. Traction - ✅ Pi Network package created (PI-NETWORK/1) - ✅ Pi Killer package created (PI-KILLER/1) -- ✅ 2009 tests passing +- ✅ 2013 tests passing - ✅ 1312 files, 0 boundary violations - ✅ DRY_RUN status (honest — not claiming live) diff --git a/docs/HOW-TO-EVALUATE.md b/docs/HOW-TO-EVALUATE.md index 3ab520e..b235181 100644 --- a/docs/HOW-TO-EVALUATE.md +++ b/docs/HOW-TO-EVALUATE.md @@ -29,7 +29,7 @@ npm test ``` **Expected / المتوقع:** -`ℹ tests 2009` · `ℹ pass 2009` · `ℹ fail 0` +`ℹ tests 2013` · `ℹ pass 2013` · `ℹ fail 0` This enforces the total against [`docs/state-snapshot.json`](state-snapshot.json). Any drift makes it fail. هذا المجموع مُقيد آليًا ضد لقطة الحالة المقاسة، وأي انحراف يفشل الاختبار. @@ -78,7 +78,7 @@ node demo.mjs ## Quick checklist | قائمة فحص سريعة -- [ ] `npm test` = **2009 / 2009 PASS** +- [ ] `npm test` = **2013 / 2013 PASS** - [ ] `claims:audit` = **PASS** - [ ] `boundary:audit` = **PASS** - [ ] `release:gate:independence` = **GATE_PASS** diff --git a/docs/LINKEDIN-CONTENT.md b/docs/LINKEDIN-CONTENT.md index 28a140f..d24f8f6 100644 --- a/docs/LINKEDIN-CONTENT.md +++ b/docs/LINKEDIN-CONTENT.md @@ -12,7 +12,7 @@ We don't tell you if a transaction looks safe. We produce independently verifiable evidence of whether execution conformed to what was authorized. Key metrics: -- 2009 tests passing (machine-pinned) +- 2013 tests passing (machine-pinned) - 10,000-run benchmark: 0 false accepts, 0 false rejects - Core DAO mainnet: 2 contracts deployed & verified - Stellar testnet: Soroban contract deployed @@ -53,8 +53,8 @@ CoreGuard Global — Traction Update ✅ Core DAO mainnet: 2 contracts deployed & verified ✅ Stellar testnet: Soroban contract deployed -✅ 2009 tests passing -✅ 1530 files scanned, 0 boundary violations +✅ 2013 tests passing +✅ 1531 files scanned, 0 boundary violations ✅ 10,000-run benchmark: 0 false accept/reject ✅ 18/18 release gate legs pass diff --git a/docs/MARKETING-PLAN.md b/docs/MARKETING-PLAN.md index 48c19e4..54a3e2e 100644 --- a/docs/MARKETING-PLAN.md +++ b/docs/MARKETING-PLAN.md @@ -3,7 +3,7 @@ ## Twitter/X Strategy ### Account: @CoreGuardGlobal -### Bio: "Verifiable Execution Truth Layer for Bitcoin DeFi. 2009 tests. 0 false accepts. Core DAO + Stellar + Pi Network." +### Bio: "Verifiable Execution Truth Layer for Bitcoin DeFi. 2013 tests. 0 false accepts. Core DAO + Stellar + Pi Network." ### Content Calendar (Daily) @@ -15,7 +15,7 @@ | Thu | Pi Network teaser | "Coming to Pi Network: verify before you submit 🛡️" | | Fri | Community | "What's your biggest DeFi security concern? Reply below 👇" | | Sat | Behind the scenes | "Building the future of verifiable execution..." | -| Sun | Weekly recap | "This week: Stellar Phase 3 complete, 2009 tests green" | +| Sun | Weekly recap | "This week: Stellar Phase 3 complete, 2013 tests green" | ### Key Hashtags #CoreDAO #Stellar #PiNetwork #DeFi #Web3 #Blockchain #Security #Verification diff --git a/docs/NUMBERS.html b/docs/NUMBERS.html index 1bbd870..eaa2d56 100644 --- a/docs/NUMBERS.html +++ b/docs/NUMBERS.html @@ -58,12 +58,12 @@

CoreGuard — numbers

Tests (full suite, machine-pinned) - 2009 tests + 2013 tests docs/state-snapshot.json#testsTotal
Pass count of the last green `npm test`; the suite asserts this number.
Boundary audit — files scanned - 1530 files + 1531 files docs/state-snapshot.json#boundaryAudit.filesScanned
Tracked files from `git ls-files` (ignored trees such as var/ are not counted).
diff --git a/docs/PITCH-DECK.md b/docs/PITCH-DECK.md index 9360cf2..5b6547a 100644 --- a/docs/PITCH-DECK.md +++ b/docs/PITCH-DECK.md @@ -27,7 +27,7 @@ Intent → Policy → Execution → Evidence → Replay → Verdict 5. Output: VERIFIED / REJECTED / UNKNOWN ## Slide 4: Traction -- ✅ 2009 tests passing (machine-pinned) +- ✅ 2013 tests passing (machine-pinned) - ✅ 1312 files, 0 boundary violations - ✅ 10,000-run benchmark: 0 false accept/reject - ✅ Core DAO mainnet: 2 contracts deployed & verified diff --git a/docs/PRODUCTION-ROADMAP.md b/docs/PRODUCTION-ROADMAP.md index e4e219c..3399dbe 100644 --- a/docs/PRODUCTION-ROADMAP.md +++ b/docs/PRODUCTION-ROADMAP.md @@ -198,7 +198,7 @@ claim of world novelty. ## 11. Measured addendum — Nov 10–12 2026 developments (by network) -> **Dated addendum (facts only, additive).** This does not revise the 2026-09-19 baseline/gates above; it records later committed developments against the same honesty discipline. Canonical measured state: **2009 / 2009 tests**, **1522 files / 0 violations**, **docs-node 133/82/30**, **Foundry 43/43** — `docs/state-snapshot.json`, `docs/STATUS.md`. No revenue, customers, partnerships, external adoption, or third-party audit is claimed. +> **Dated addendum (facts only, additive).** This does not revise the 2026-09-19 baseline/gates above; it records later committed developments against the same honesty discipline. Canonical measured state: **2013 / 2013 tests**, **1522 files / 0 violations**, **docs-node 133/82/30**, **Foundry 43/43** — `docs/state-snapshot.json`, `docs/STATUS.md`. No revenue, customers, partnerships, external adoption, or third-party audit is claimed. ### Stellar (pre-sign receipts, agent-gate signed envelope, Freighter, DEX integration) - **PSAR/1 pre-sign authorization receipts (BUILT · TEST_EXECUTED · integration NOT_BUILT):** `packages/stellar/presign.mjs` — receipt bound to exact XDR bytes (sha256 + Ed25519 over canonical JSON, pinned issuer, injected clock/window), fail-closed `PASS`/`BLOCK`, 11 frozen reject codes, `executionProof: NOT_INCLUDED`; `npm run stellar:presign`; `test/integrations/stellar-presign.test.mjs`; hardening + self-review (`docs/psar-security-review-2026-11-12.md`); wallet proposal (`docs/freighter-presign-integration-proposal-2026-11-12.md`); 90s presentation demo video (visual replay of captured clean-clone output) in `docs/PRODUCTS.html` / `docs/STELLAR-INTEGRATION-GUIDE.md` and `assets/`. Scoped technical-evaluation comment **posted** on `stellar/freighter#3087` and recorded (no endorsement/merge/adoption). diff --git a/docs/ROADMAP-4MONTH.md b/docs/ROADMAP-4MONTH.md index 1cab0f3..995fe59 100644 --- a/docs/ROADMAP-4MONTH.md +++ b/docs/ROADMAP-4MONTH.md @@ -21,7 +21,7 @@ Focused roadmap for SCF Build Award. 4 months, 3 core functions, verifiable deli - [ ] Documentation updated (done) ### Verification -- `npm test` passes (2009 tests) +- `npm test` passes (2013 tests) - `node scripts/current-state.mjs --check` passes - Contract ID verifiable on Stellar Expert diff --git a/docs/SCF-46-RFP2-XDR-AUDIT-SUBMISSION-2026-11-13.md b/docs/SCF-46-RFP2-XDR-AUDIT-SUBMISSION-2026-11-13.md index 7d4d6cc..dff112c 100644 --- a/docs/SCF-46-RFP2-XDR-AUDIT-SUBMISSION-2026-11-13.md +++ b/docs/SCF-46-RFP2-XDR-AUDIT-SUBMISSION-2026-11-13.md @@ -48,7 +48,7 @@ Standing claims discipline (binding): every number in our forms is machine-measu ### B.1 Why we are a good fit (with evidence, not adjectives) -- **Byte-level XDR discipline is already shipped and CI-measured.** PSAR/1 binds an authorization decision to the EXACT transaction XDR bytes before any signature exists; AGENT-XDR/1 binds authorized intent to signed-envelope bytes field by field; a real testnet signature has been carried through the lane with committed evidence. Suite: 2009 / 2009 tests, machine-pinned against `docs/state-snapshot.json` and enforced on every push by `scripts/run-tests.mjs`. +- **Byte-level XDR discipline is already shipped and CI-measured.** PSAR/1 binds an authorization decision to the EXACT transaction XDR bytes before any signature exists; AGENT-XDR/1 binds authorized intent to signed-envelope bytes field by field; a real testnet signature has been carried through the lane with committed evidence. Suite: 2013 / 2013 tests, machine-pinned against `docs/state-snapshot.json` and enforced on every push by `scripts/run-tests.mjs`. - **Cross-language truth is our standing working method.** The Soroban commitment-anchor crate carries a JS mirror plus a cross-language known-answer vector; the Rust leg runs in CI (17/17 in the anchor crate). "Two independent implementations must agree on bytes" is not a slogan here — it is an enforced contract. - **Fail-closed is our default posture, with negative controls to prove it.** A verifier error is itself a BLOCK, never a pass; the repo maintains mutation batteries where every guard must be observed to bite. `VERIFIED ≠ SAFE` is a standing label, and our own docs say so. - **We reproduced one of the RFP's own sighting classes before submitting** (the reviewability gate): the #1766 ordering-divergence class — two valid Ed25519 issuers whose strkey-string order is the OPPOSITE of their XDR-byte order — reproduced offline and committed as evidence with four byte-round-trip-verified sample corpus entries, including a CAP-0040 signed-payload signer and a CAP-0027 muxed account with its SEP-0023 M-strkey. See B.5 for the artifact. @@ -147,7 +147,7 @@ The RFP marks proposals without these as incomplete. All three exist as committe ## Part C — Measured repo state (machine-pinned, at this instrument's landing) -- npm tests: **2009 / 2009 tests** (machine-pinned; enforced by `scripts/run-tests.mjs` against `docs/state-snapshot.json`). +- npm tests: **2013 / 2013 tests** (machine-pinned; enforced by `scripts/run-tests.mjs` against `docs/state-snapshot.json`). - Boundary audit: **1148 tracked files · 0 violations** (the three files this instrument lands — this doc, the reproduction script, its evidence artifact — are counted; measured from `git ls-files`, the count a fresh clone reproduces). - Docs-node contract: **133 executed · 82 skip-listed · 30 covered** (unchanged; this instrument is fence-free by construction, like its 2026-11-06 predecessor). - Foundry: **43/43 pass** (CI-measured). Claims audit: **PASS (0 violations)**. diff --git a/docs/SCF-BUILD-APPLICATION-V2.md b/docs/SCF-BUILD-APPLICATION-V2.md index 0e06a26..ebae370 100644 --- a/docs/SCF-BUILD-APPLICATION-V2.md +++ b/docs/SCF-BUILD-APPLICATION-V2.md @@ -29,7 +29,7 @@ Per `docs/surface-status.json` and `docs/EVIDENCE-MATRIX.md`: | Freighter signing path | BUILT_UNVERIFIED | NONE | NOT_BUILT | | External adopter | — | — | **0** | -Suite total: **2009 / 2009 pass**, pinned in +Suite total: **2013 / 2013 pass**, pinned in `docs/state-snapshot.json`. Boundary audit: 0 violations. Claim registry: no `VERIFIED` claim without a committed artifact. diff --git a/docs/SCF-BUILD-APPLICATION.md b/docs/SCF-BUILD-APPLICATION.md index 7a84b0a..974825a 100644 --- a/docs/SCF-BUILD-APPLICATION.md +++ b/docs/SCF-BUILD-APPLICATION.md @@ -51,7 +51,7 @@ CoreGuard is a verifiable execution truth layer. It produces independently verif ### 3. Technical Feasibility **Already built and tested:** -- ✅ 2009 tests passing (machine-pinned) +- ✅ 2013 tests passing (machine-pinned) - ✅ 1312 files, 0 boundary violations - ✅ 10,000-run benchmark: 0 false accept, 0 false reject - ✅ Soroban commitment anchor deployed on Stellar MAINNET (`CCKA2GYVILX7YZVSXGVIHOPNLTRBBF2SSWKBTQBIE7M67N5N2QMMXPSP`) @@ -105,7 +105,7 @@ CoreGuard is a verifiable execution truth layer. It produces independently verif - **Twitter**: https://x.com/CoreGuardGlobal **Experience:** -- Built CoreGuard from scratch (2009 tests, 1312 files) +- Built CoreGuard from scratch (2013 tests, 1312 files) - Deployed 2 contracts on Core DAO mainnet - Deployed Soroban commitment anchor on Stellar MAINNET (`CCKA2GYVILX7YZVSXGVIHOPNLTRBBF2SSWKBTQBIE7M67N5N2QMMXPSP`) and executed the first owner-authorized anchor CALL (INVOKED, tx `69044807410f65027c1227f4e525ad83f23a6cb1a2bb79790d82849c5dbc9fec`, ledger 65,337,373) - Executed the first SIGNED funded mainnet swap (DEX-GATE/1 gated, CONFIRMED, tx `ac2a7990b3387aab96b197c0c921d57756bd25d65ad0e75b93561ded640b9097`, ledger 65,338,112) @@ -132,7 +132,7 @@ CoreGuard is a verifiable execution truth layer. It produces independently verif ### Traction (on other chains) - ✅ Core DAO mainnet: 2 contracts deployed & verified -- ✅ 2009 tests passing +- ✅ 2013 tests passing - ✅ 10,000-run benchmark: 0 false accept, 0 false reject - ✅ 1,000/1,000 mutants refused - ✅ 18/18 release gate legs pass diff --git a/docs/SCF-INTEREST-FORM-2026-11-16.md b/docs/SCF-INTEREST-FORM-2026-11-16.md index e2c80cd..098fec1 100644 --- a/docs/SCF-INTEREST-FORM-2026-11-16.md +++ b/docs/SCF-INTEREST-FORM-2026-11-16.md @@ -31,7 +31,7 @@ than to hit a date that has passed. | First signed, funded DEX execution | `pathPaymentStrictSend` CONFIRMED, tx `ac2a7990b3387aab96b197c0c921d57756bd25d65ad0e75b93561ded640b9097`, ledger 65,338,112, `4.0598146 XLM → 0.6306239 USDC` | `docs/evidence/stellar-dex-swap-executed.json` | | Pre-sign authorization receipts (PSAR/1) | 11 frozen reject codes, byte-exact XDR binding, Ed25519, PASS/BLOCK offline demo | `packages/stellar/presign.mjs`, `npm run trust:demo` | | Verification ladder L0–L4 | L1 chain-confirmed receipts with a separately reported identity-binding axis; L2 deterministic replay; L3 SHA-256 merkle proofs; L4 frozen boundary, `RESEARCH`, no ZK claim | `scripts/ladder/verification-levels.mjs`, `npm run verify:levels` | -| Suite | 2009 tests, machine-pinned: `scripts/run-tests.mjs` fails the run if the total drifts from `docs/state-snapshot.json` | `npm test` | +| Suite | 2013 tests, machine-pinned: `scripts/run-tests.mjs` fails the run if the total drifts from `docs/state-snapshot.json` | `npm test` | | Package | `@coreguard/stellar` is **publishable, not published** (exports, types, `files` allowlist, offline pack-and-import test from outside the repo) | `test/integrations/stellar-package-import.test.mjs` | | External conformance | AER-1 id-binding vectors (kit v1.5.7) vendored verbatim with both digests pinned and replayed in CI | `test/fixtures/aer1-corpus-v1.5.7/`, `test/integrations/aer1-id-binding-fixtures.test.mjs` | diff --git a/docs/STATUS.md b/docs/STATUS.md index 5e2f4aa..98aa423 100644 --- a/docs/STATUS.md +++ b/docs/STATUS.md @@ -8,7 +8,7 @@ machine-measured, not estimated. Last verified: **2026-11-16**. | Item | Value | How verified | |---|---|---| -| Test suite | **1841 / 1841 pass** (+34 measured 2026-11-17 - `test/integrations/trust-anchor-set.test.mjs` 21 + `test/integrations/provenance-fuzz.test.mjs` 3 + `test/integrations/provenance-mutations.test.mjs` 10: the owner-authorized provenance v2-foundation wave - CG-TAS/1 `scripts/ladder/trust-anchor-set.mjs` (caller-pinned canonical anchor-set document with an optional sha256 digest pin over canonical bytes, per-key notBefore/notAfter rotation windows judged only against the caller-injected decision time with inclusive bounds, revocation decisive and permanent within the set regardless of signature validity with revokedAt informational, duplicate keyId (even byte-identical) a CONFLICT never first-match, strict shape validation, and the record never selecting or influencing its trust key) composing over the UNCHANGED CG-RRP/1 verifier, plus the deterministic offline fuzz campaign `scripts/ladder/provenance-fuzz.mjs` (10 attack families incl. 2 direct-path families, benign canonicalization invariance, determinism sampling, zero escapes / zero benign drift / zero contract violations at 1000 iterations) and the applied-and-bites source-mutation battery (9 named provenance mutants, each must escape its probe as VERIFIED when the guard is deleted)) (+9 measured 2026-11-16 — two contracts over the reviewer deliverables: `test/ci/demo-script-contract.test.js` (4: the demo script is EXECUTABLE — its `demo` fences are extracted, run in order from the repo root and compared fragment-by-fragment with the output they promise, one step declared `exit 1` because a tamper step that exits 0 is the defect, failures name `docs/reviewer-demo-script-2026-09.md:LINE`, placeholders rejected, and a negative control proving the comparator is not vacuous) + `test/ci/bilingual-pairs.test.js` (5: the Arabic editions of the three CG-BTY-005 deliverables are declared pairs carrying a provenance line that pins the English source's CRLF-normalized digest, so a missing Arabic side, a stale translation and an undeclared orphan each fail by file name); +21 measured 2026-11-16 - `test/integrations/agent-commerce-firewall.test.mjs` 21: product 1 ships as ONE composed authorization firewall - `packages/agent-commerce/firewall.mjs` (AC-FW/1, new) composing the existing engines (`packages/policy` + the CGCR/1 consent binding + the CGEP/1 verdict + the AGR/1 taxonomy - no fifth engine): the PRE-EXECUTION gate `authorizeRequest` judges the DECLARED request (committed policy against the family's shared trace???policy context `packages/agent-commerce/policy-context.mjs` (new) ?? consent byte-match (the request's declared bytes must be byte-identical to the approved ones, and any claimed intent/policy must canonical-match) ?? the authorization window ONLY against a caller-pinned `nowSeconds` (the wall clock is never read) ?? single-use replay state consulted, NEVER consumed) and the POST-EXECUTION review `reviewExecution` returns the full verifyExecution record (a single-use consent is consumed by its first verified execution); frozen 6-code refusal vocabulary (MALFORMED_REQUEST ?? POLICY_REFUSED ?? CONSENT_MISMATCH ?? CONSENT_INVALID ?? WINDOW_CLOSED ?? SINGLE_USE_CONSUMED), ALLOW only on an empty reasons list, unreadable fields refused never guessed, decisions byte-deterministic (the verifier's own wall-clock report field is deliberately dropped); `createFirewall({ consumedSet })` binds one guard with one shared ledger for both decision points; the exact arc VERIFIES offline (PRE ALLOW ??? POST VERIFIED) and the negative battery REFUSES with the named codes (recipient swap ??? CONSENT_MISMATCH + allowlist rules ?? value escalation ??? POLICY_REFUSED ?? tampered consent ??? CONSENT_INVALID ?? window closed ??? WINDOW_CLOSED ?? replay pre ??? SINGLE_USE_CONSUMED ?? replay post ??? INVALID with SINGLE_USE_REUSE); `docs/surface-status.json` product-1 entry re-pointed from the older Stellar mandate gate to the composed face, the alignment guarded by a contract test; deterministic demo `examples/agent-commerce-firewall/run.mjs` + committed byte-stable `artifacts.json` (exit 0 ONLY on the exact arc)) (+16 measured 2026-11-15 - `test/integrations/agent-commerce-attestation.test.mjs` 16: product 5 CGXA/1 cross-chain execution attestation (offline ?? deterministic ?? fail-closed, BUILT ?? TEST_EXECUTED; the on-chain broadcast legs stay OWNER-GATED / NOT_PERFORMED) - the frozen 9-code reject vocabulary (MALFORMED_ATTESTATION ?? ADAPTER_UNKNOWN ?? CHAIN_BINDING_MISMATCH ?? LEVEL_MISMATCH ?? CONSENT_MISMATCH ?? EXECUTION_MISMATCH ?? TIME_INVALID ?? ID_MISMATCH ?? VERIFIER_ERROR) and the frozen adapter registry (core-dao-anchor chainId 1116 anchor `0x037dF08F2d43c5D03759279Fe35664f6AFf9EA6E` per `docs/DEPLOYMENT.md` ?? stellar-anchor contract `CCKA2GYVILX7YZVSXGVIHOPNLTRBBF2SSWKBTQBIE7M67N5N2QMMXPSP` per `docs/EVIDENCE-MATRIX.md`) with every adapter fact literal verified against its cited committed document; the exact arc VERIFIES offline against both adapters and the record id re-derives byte-deterministically (same inputs, same bytes); the negative battery: a wrong attestation id REFUSES with ID_MISMATCH ?? a different consent REFUSES with CONSENT_MISMATCH ?? a drifted executed trace REFUSES with EXECUTION_MISMATCH ?? an unknown adapter REFUSES with ADAPTER_UNKNOWN ?? a mutated chain binding fact REFUSES with CHAIN_BINDING_MISMATCH ?? a mutated verification level REFUSES with LEVEL_MISMATCH ?? time is pinned (the wall clock is never read: build throws TIME_INVALID, verify refuses TIME_INVALID) ?? an unknown field REFUSES with MALFORMED_ATTESTATION (the field set is closed) ?? an error inside the verifier itself REFUSES with VERIFIER_ERROR, never a leaked pass; the two honesty invariants: the attestation view consumes NOTHING (a single-use consent is still first-consumed by its verified execution) and there is no broadcast surface (no exported name signs, submits or sends)) (+26 measured 2026-11-15 - `test/integrations/agent-commerce-types.test.mjs` 6 + `test/integrations/agent-commerce-attack-battery.test.mjs` 13 + `test/integrations/agent-commerce-dashboard-page.test.mjs` 7: the agent-commerce family - the TypeScript declaration surface `packages/agent-commerce/index.d.ts` (declared/runtime export parity, constants, boundary strings, no-implementation guarantee), the named attack battery over the committed demo `examples/agent-commerce-security-suite/artifacts.json` (6-vector prompt-injection fuzz V1-V6, RECIPIENT_SWAP, TAX_SHIPPING_FEE_DRIFT, CREDENTIAL_SUBSTITUTION, ITEM_MUTATION, EXPIRED, RECEIPT_TAMPER, REPLAY, the documented CROSS_SESSION shared-ledger gap, per-leg ledger isolation with a dedicated default-ledger leg, byte-determinism), and the bilingual RTL/EN operator dashboard `docs/agent-commerce-dashboard.html` (island byte-equality with artifacts.json, i18n pairing, fully-offline contract); +2 measured 2026-11-14 - `test/integrations/execution-trust-demo.test.mjs`: the four-pillar demo (authorization PASS, tampered envelope BLOCK/`XDR_BINDING_MISMATCH`, expired window BLOCK/`RECEIPT_EXPIRED`, third-party PASS, one-field edit BLOCK/`BAD_DIGEST`) plus byte-identical receipts across fresh runs; +10 measured 2026-11-12 - `test/integrations/stellar-presign.test.mjs` 37: PSAR/1 pre-sign authorization receipts `packages/stellar/presign.mjs` - byte-exact XDR binding (sha256 + Ed25519 over canonical JSON), fail-closed PASS/BLOCK with 11 frozen reject codes, windowed validity with an injected clock, executionProof NOT_INCLUDED on every verdict, known-answer vectors + the offline demo contract; +13 measured 2026-11-12 - `test/integrations/agent-gate-field-tamper.test.mjs` + `test/integrations/agent-gate-replay-determinism.test.mjs` (the signed-envelope field-tamper battery: the authorized intent bound to the signed envelope bytes field by field over the canonical-vector fixture; and the replay-determinism battery: the invariants run as the test contract's own actions rather than a cheatcode target); +15 measured 2026-11-11 - `test/integrations/bounty-escrow.test.mjs` 15: the ESCROW/1 bounty-escrow mirror `packages/bounty-escrow/index.mjs` - fail-closed fund/claim/deliver/verify/release/refund lifecycle + 5 negative controls + known-answer vectors; +20 measured 2026-11-10 - `test/integrations/agent-payment-gate.test.mjs` 10 + `test/ci/surface-status.test.mjs` 10: the AGENT-GATE/1 contract and the three-axis status guard; earlier +4 measured into this suite 2026-11-10 ??? the authorized-lane rejection decode + fee-solvency battery: the committed mainnet artifact's REJECTED `upload(wasm)` `errorResultXdr` bytes decode txInsufficientBalance (-7) at feeCharged 130861110 (composition requested 1000000 + resource 129861110, artifact-arithmetic-bound); decode fail-closed probes (junk never invents a code; the rehearsal's measured txBadSeq blob decodes to -5/txBadSeq at feeCharged 40674); the fee-solvency battery (measured 130861110 vs 35069800 refused PRE_SEND_SOLVENCY; fee+reserve boundary applied-and-bites at the single stroop; exact per-account minimum from subentry_count ??? 1 USDC trustline ??? 3 ?? 5000000); and the source contract (solvency consult precedes every submission; artifacts self-decode rejections; REJECTED/FAILED/TIMEOUT steps always downgrade the verdict) ?? then +17 measured into this suite 2026-11-09: +1 readback decoder ??? the typed-sim scvMap face (soroban-testnet measured 2026-11-08) decodes SOME ??? the OWNER-AUTHORIZED mainnet deploy contract battery, offline, every gate green + applied-and-bite: decision-doc literal parse, owner-flag gate, CI-artifact manifest identity (artifactName / runId / wasmSha256 / headSha ancestor-of-HEAD), fee floor + 1.5x policy, rehearsal-first gate, digest order-independence, the cross-language known-answer id, deterministic-salt idempotency fork/dup, artifact-surface paths, a source-level secret-discipline scanner (applied-and-bite), and the readback decoder's fail-closed branches) ?? then +15 measured into this suite 2026-11-07: +8 `test/integrations/stellar-soroban.test.mjs` (11???19 ??? XDR/type-code decode helpers + the authorized-lane call-site contract + the cross-language known-answer vector) + +7 `test/ci/doc-numbers.test.js` (the tests-claims bond: every doc suite-count statement must equal this snapshot's total) ?? then +3 dex-swap executed ??? the first SIGNED funded mainnet swap: `test/integrations/execution-evidence-contract.test.mjs` +3 ??? `docs/evidence/stellar-dex-swap-executed.json` digest-faithful (first SIGNED funded mainnet swap CONFIRMED through DEX-GATE/1 preflight: swap tx `ac2a7990b3387aab96b197c0c921d57756bd25d65ad0e75b93561ded640b9097`, ledger 65,338,112; trustline tx `09243337fd04d7ead8e369a8a5d5ef48648179db84608b262d5379f34fa72d76`, ledger 65,338,111; `4.0598146 XLM ??? 0.6306239 USDC`; wire read-backs equal `fee_charged` to the stroop) + the read-back arithmetic test + a tamper control ??? FIVE committed runner artifacts now digest-pinned by the contract; execution runner + measured artifact: `scripts/stellar-dex-swap-executed.mjs` ?? `docs/evidence/stellar-dex-swap-executed.json`; earlier: +6 soroban commit-executed: `test/integrations/stellar-soroban.test.mjs` +4 ??? the owner-authorized mainnet commit lane INVOKED via an injected submitter with the exact pair + wire-op decode, the fail-closed `ownerAuthorization` mainnet gate, `0x`-prefixed id acceptance, and the honest SUBMITTED/NOT_AUTHORIZED/REJECTED paths; `test/integrations/execution-evidence-contract.test.mjs` +2 ??? `docs/evidence/stellar-soroban-commit-executed.json` digest-faithful (INVOKED mainnet anchor on the exact pair) + a tamper control ??? FOUR committed runner artifacts now digest-pinned by the contract; execution runner + measured artifact: `scripts/stellar-soroban-commit-executed.mjs` ?? `docs/evidence/stellar-soroban-commit-executed.json` (tx `69044807410f65027c1227f4e525ad83f23a6cb1a2bb79790d82849c5dbc9fec`, ledger 65,337,373, on-chain read-back `{hash, seq}` exact); earlier: +6 executed-evidence contract `test/integrations/execution-evidence-contract.test.mjs` ??? the commit-pinned runner artifacts (STELLAR-AGENT/1 gate ?? DEX-GATE/1 on the REAL mainnet order book ?? GuardShield/1 decision arms) digest-checked with three tamper controls that each apply AND bite; earlier: +2 stellar-agent verifier `test/integrations/stellar-agent.test.mjs` ??? STELLAR-AGENT/1 fail-closed payment verifier over `packages/stellar/index.mjs`, policy/allowlist/deadline judged before any submit, receipts replayable via CGEP/1, honest DRY_RUN/NOT_BUILT status); earlier: +4 commit binding: `test/ci/perf-commit-binding.test.js` ??? every trend point records the git sha of the exact commit whose code was measured (`git rev-parse HEAD` of the measured checkout; no reachable git ??? NO sha recorded and NO data-sha fabricated anywhere, ceiling-respecting so a nested checkout can never inherit a parent repository's sha), `--badges` stamps each series badge with `data-sha` naming its latest point's measured-at commit while the aggregate wears none (its points may span commits), and the shared audit core `test/ci/badge-audit.mjs` bites by name on a wrong binding (STALE COMMIT BINDING), a missing one, a fabricated one (a sha the ledger never carried), and a single-commit claim on `perf??all`; then: +6 quick-start templates page: `docs/QUICKSTART.html` documents `create:integration` (default guard-floor mode vs `--dde` DDE-evidence + payout-gate mode) with LIVE derivations, not retyped prose ??? commands parsed from `scripts/create-integration.mjs` usage + `package.json`, both template trees fetched from the GitHub API contents endpoint, and the committed engine `templates/integration-dde/engine-dde.mjs` executed in the reader's tab on the committed ten-record fixture (verifyPins + verifyDeliveryFixture) with the acceptance predicate derived from `payout-gate.mjs`'s own bytes, red chips BY NAME on dead feeds, AR/EN throughout; `test/delivery/quickstart-page.test.js` executes parseUsage/parseModes/parseFileKey/buildFixture/statusBlock/checkRow/gateBlock in a VM on the real committed bytes AND drives the real engine subprocess (VERIFIED verdict agreed row-by-row, HOLD gate agreed with the real `payout-gate.mjs --json` exit-2 run) with 4 negative mutations each applying AND biting; + the DDE scaffold runners (`verify-dde.mjs`, `payout-gate.mjs`) now resolve their fixture via `fileURLToPath`, fixing the `pathname` percent-encoding break on Windows paths with spaces ??? the live examples run as-is anywhere; then: +4 main-badge-sync audit: `test/ci/main-badge-sync.test.js` audits badge???ledger sync at the tip main actually SERVES ??? ledger, module badge table and every `docs/badges/*.svg` read from the GIT COMMIT TREE via `git cat-file -p :path` / `git ls-tree` (HEAD on main checkouts, else `refs/remotes/origin/main`, failing named when neither is reachable), a staged newer ledger point bites STALE by name proving the audit reads committed bytes, and the audit core moved to `test/ci/badge-audit.mjs` so working-tree and commit-tree surfaces consume ONE derivation; earlier: +4 badge-freshness audit: `test/ci/badge-freshness.test.js` re-derives badge freshness at COMMIT granularity ??? for every BADGE_SERIES row (parsed from the module, budgets never retyped) the committed `docs/badges/*.svg` must show the ledger's LATEST recorded point and the ladder verdict color, `perf-all` must be the worst case of exactly the rendered set (nightly absence honored: no badge before its first point), any committed `perf-*` file the module does not declare is a criminal artifact (the CG-BDG/1 `specimen-*` family is explicitly out of scope), and 3 mutation controls each apply AND bite by name (stale value / lying color / phantom badge ??? a green badge the ladder calls yellow fails loudly); then: +3 aggregate perf badge: a fourth rendered badge `perf-all.svg` / README row `DDE perf ?? all` sums the always-on set's badges by worst case ??? all inside budget ??? green `all within budget`, any series past its budget but inside the 2x bar ??? yellow `N above budget`, beyond the bar ??? red `regression detected` ??? computed ONLY from badges the run rendered (the nightly load tail joins when it records) with the same fail-closed atomicity, contract-tested in `perf-badges.test.js` (+3); then: +5 first-drift trend alert: `test/ci/perf-drift-alert.test.js` ??? the trend gate's first breach names series, metric, current, baseline and ratio three ways (structured `alert` in the --json status, stderr block, and a breach row appended to the GitHub run summary when GITHUB_STEP_SUMMARY is set ??? the failing run's Summary page shows the offender beside the red gate, append-only and best-effort), a FAIL-gate report is a recording error and never dresses up as a regression, a green run emits no alert and touches no summary, and a breached run still records NOTHING; then: +8 live trend page: `docs/DDE-TREND.html` ??? the engine/wire/SDK median curves redrawn from the committed `benchmarks/perf-history.jsonl` on every load and re-polled every 60s so each tracker-bot point appends itself to the page without a redeploy, budgets derived live from `scripts/benchmark-trend.mjs` (a module budget bump moves the page in the same push), red named shim strips naming the exact URL whose ledger source is dark, AR/EN throughout; the contract executes the page's JS in a VM against the real bytes, drives the 60s poll and the refetch channel through the tokenizer too, and 6 page-mutation negative controls each apply AND bite; then: +4 depth-pair surfacing: the live perf page now shows the sequential median ??? p95-under-concurrency pair derived from the trend module, the respondent row carries `metric: "p95"` end to end, and the page queueing honesty framing + the unrecorded-point absence note are both contract-tested; then: +5 light load runner: a 50-way `POST /verify` burst whose gate requires the requested peak in flight AND an overlap factor (?? latency / wall time) ??? 2, refuses `--concurrency 1` as sequential by name, and fails on a p95 budget it cannot meet; +16 live-playground page contract: the page's engine copies are executed against the real packages through the full ACCEPTED/REJECTED/UNKNOWN job run and must agree state-by-state, the x402 gate must refuse before a signature on the browser crypto-shim, the shim must pass the FIPS vectors, and four page mutations plus one engine byte must each apply AND bite; +1 index card; earlier: +19 job-economy flow battery: CG-BUD/1 sibling-scope race + settlement/metered one-ceiling + hold/disposition matrix in `test/integrations/budget-acceptance-flow.test.mjs`, +1 claims-audit committed-bind negative control) | `npm test` ??? the pass total is machine-pinned: `scripts/run-tests.mjs` enforces it against `docs/state-snapshot.json` after every green run (drift = red), and `test/ci/current-state.test.js` re-measures the fast fields (Boundary audit | **PASS** (1530 files scanned, 0 violations)) +| Test suite | **1841 / 1841 pass** (+34 measured 2026-11-17 - `test/integrations/trust-anchor-set.test.mjs` 21 + `test/integrations/provenance-fuzz.test.mjs` 3 + `test/integrations/provenance-mutations.test.mjs` 10: the owner-authorized provenance v2-foundation wave - CG-TAS/1 `scripts/ladder/trust-anchor-set.mjs` (caller-pinned canonical anchor-set document with an optional sha256 digest pin over canonical bytes, per-key notBefore/notAfter rotation windows judged only against the caller-injected decision time with inclusive bounds, revocation decisive and permanent within the set regardless of signature validity with revokedAt informational, duplicate keyId (even byte-identical) a CONFLICT never first-match, strict shape validation, and the record never selecting or influencing its trust key) composing over the UNCHANGED CG-RRP/1 verifier, plus the deterministic offline fuzz campaign `scripts/ladder/provenance-fuzz.mjs` (10 attack families incl. 2 direct-path families, benign canonicalization invariance, determinism sampling, zero escapes / zero benign drift / zero contract violations at 1000 iterations) and the applied-and-bites source-mutation battery (9 named provenance mutants, each must escape its probe as VERIFIED when the guard is deleted)) (+9 measured 2026-11-16 — two contracts over the reviewer deliverables: `test/ci/demo-script-contract.test.js` (4: the demo script is EXECUTABLE — its `demo` fences are extracted, run in order from the repo root and compared fragment-by-fragment with the output they promise, one step declared `exit 1` because a tamper step that exits 0 is the defect, failures name `docs/reviewer-demo-script-2026-09.md:LINE`, placeholders rejected, and a negative control proving the comparator is not vacuous) + `test/ci/bilingual-pairs.test.js` (5: the Arabic editions of the three CG-BTY-005 deliverables are declared pairs carrying a provenance line that pins the English source's CRLF-normalized digest, so a missing Arabic side, a stale translation and an undeclared orphan each fail by file name); +21 measured 2026-11-16 - `test/integrations/agent-commerce-firewall.test.mjs` 21: product 1 ships as ONE composed authorization firewall - `packages/agent-commerce/firewall.mjs` (AC-FW/1, new) composing the existing engines (`packages/policy` + the CGCR/1 consent binding + the CGEP/1 verdict + the AGR/1 taxonomy - no fifth engine): the PRE-EXECUTION gate `authorizeRequest` judges the DECLARED request (committed policy against the family's shared trace???policy context `packages/agent-commerce/policy-context.mjs` (new) ?? consent byte-match (the request's declared bytes must be byte-identical to the approved ones, and any claimed intent/policy must canonical-match) ?? the authorization window ONLY against a caller-pinned `nowSeconds` (the wall clock is never read) ?? single-use replay state consulted, NEVER consumed) and the POST-EXECUTION review `reviewExecution` returns the full verifyExecution record (a single-use consent is consumed by its first verified execution); frozen 6-code refusal vocabulary (MALFORMED_REQUEST ?? POLICY_REFUSED ?? CONSENT_MISMATCH ?? CONSENT_INVALID ?? WINDOW_CLOSED ?? SINGLE_USE_CONSUMED), ALLOW only on an empty reasons list, unreadable fields refused never guessed, decisions byte-deterministic (the verifier's own wall-clock report field is deliberately dropped); `createFirewall({ consumedSet })` binds one guard with one shared ledger for both decision points; the exact arc VERIFIES offline (PRE ALLOW ??? POST VERIFIED) and the negative battery REFUSES with the named codes (recipient swap ??? CONSENT_MISMATCH + allowlist rules ?? value escalation ??? POLICY_REFUSED ?? tampered consent ??? CONSENT_INVALID ?? window closed ??? WINDOW_CLOSED ?? replay pre ??? SINGLE_USE_CONSUMED ?? replay post ??? INVALID with SINGLE_USE_REUSE); `docs/surface-status.json` product-1 entry re-pointed from the older Stellar mandate gate to the composed face, the alignment guarded by a contract test; deterministic demo `examples/agent-commerce-firewall/run.mjs` + committed byte-stable `artifacts.json` (exit 0 ONLY on the exact arc)) (+16 measured 2026-11-15 - `test/integrations/agent-commerce-attestation.test.mjs` 16: product 5 CGXA/1 cross-chain execution attestation (offline ?? deterministic ?? fail-closed, BUILT ?? TEST_EXECUTED; the on-chain broadcast legs stay OWNER-GATED / NOT_PERFORMED) - the frozen 9-code reject vocabulary (MALFORMED_ATTESTATION ?? ADAPTER_UNKNOWN ?? CHAIN_BINDING_MISMATCH ?? LEVEL_MISMATCH ?? CONSENT_MISMATCH ?? EXECUTION_MISMATCH ?? TIME_INVALID ?? ID_MISMATCH ?? VERIFIER_ERROR) and the frozen adapter registry (core-dao-anchor chainId 1116 anchor `0x037dF08F2d43c5D03759279Fe35664f6AFf9EA6E` per `docs/DEPLOYMENT.md` ?? stellar-anchor contract `CCKA2GYVILX7YZVSXGVIHOPNLTRBBF2SSWKBTQBIE7M67N5N2QMMXPSP` per `docs/EVIDENCE-MATRIX.md`) with every adapter fact literal verified against its cited committed document; the exact arc VERIFIES offline against both adapters and the record id re-derives byte-deterministically (same inputs, same bytes); the negative battery: a wrong attestation id REFUSES with ID_MISMATCH ?? a different consent REFUSES with CONSENT_MISMATCH ?? a drifted executed trace REFUSES with EXECUTION_MISMATCH ?? an unknown adapter REFUSES with ADAPTER_UNKNOWN ?? a mutated chain binding fact REFUSES with CHAIN_BINDING_MISMATCH ?? a mutated verification level REFUSES with LEVEL_MISMATCH ?? time is pinned (the wall clock is never read: build throws TIME_INVALID, verify refuses TIME_INVALID) ?? an unknown field REFUSES with MALFORMED_ATTESTATION (the field set is closed) ?? an error inside the verifier itself REFUSES with VERIFIER_ERROR, never a leaked pass; the two honesty invariants: the attestation view consumes NOTHING (a single-use consent is still first-consumed by its verified execution) and there is no broadcast surface (no exported name signs, submits or sends)) (+26 measured 2026-11-15 - `test/integrations/agent-commerce-types.test.mjs` 6 + `test/integrations/agent-commerce-attack-battery.test.mjs` 13 + `test/integrations/agent-commerce-dashboard-page.test.mjs` 7: the agent-commerce family - the TypeScript declaration surface `packages/agent-commerce/index.d.ts` (declared/runtime export parity, constants, boundary strings, no-implementation guarantee), the named attack battery over the committed demo `examples/agent-commerce-security-suite/artifacts.json` (6-vector prompt-injection fuzz V1-V6, RECIPIENT_SWAP, TAX_SHIPPING_FEE_DRIFT, CREDENTIAL_SUBSTITUTION, ITEM_MUTATION, EXPIRED, RECEIPT_TAMPER, REPLAY, the documented CROSS_SESSION shared-ledger gap, per-leg ledger isolation with a dedicated default-ledger leg, byte-determinism), and the bilingual RTL/EN operator dashboard `docs/agent-commerce-dashboard.html` (island byte-equality with artifacts.json, i18n pairing, fully-offline contract); +2 measured 2026-11-14 - `test/integrations/execution-trust-demo.test.mjs`: the four-pillar demo (authorization PASS, tampered envelope BLOCK/`XDR_BINDING_MISMATCH`, expired window BLOCK/`RECEIPT_EXPIRED`, third-party PASS, one-field edit BLOCK/`BAD_DIGEST`) plus byte-identical receipts across fresh runs; +10 measured 2026-11-12 - `test/integrations/stellar-presign.test.mjs` 37: PSAR/1 pre-sign authorization receipts `packages/stellar/presign.mjs` - byte-exact XDR binding (sha256 + Ed25519 over canonical JSON), fail-closed PASS/BLOCK with 11 frozen reject codes, windowed validity with an injected clock, executionProof NOT_INCLUDED on every verdict, known-answer vectors + the offline demo contract; +13 measured 2026-11-12 - `test/integrations/agent-gate-field-tamper.test.mjs` + `test/integrations/agent-gate-replay-determinism.test.mjs` (the signed-envelope field-tamper battery: the authorized intent bound to the signed envelope bytes field by field over the canonical-vector fixture; and the replay-determinism battery: the invariants run as the test contract's own actions rather than a cheatcode target); +15 measured 2026-11-11 - `test/integrations/bounty-escrow.test.mjs` 15: the ESCROW/1 bounty-escrow mirror `packages/bounty-escrow/index.mjs` - fail-closed fund/claim/deliver/verify/release/refund lifecycle + 5 negative controls + known-answer vectors; +20 measured 2026-11-10 - `test/integrations/agent-payment-gate.test.mjs` 10 + `test/ci/surface-status.test.mjs` 10: the AGENT-GATE/1 contract and the three-axis status guard; earlier +4 measured into this suite 2026-11-10 ??? the authorized-lane rejection decode + fee-solvency battery: the committed mainnet artifact's REJECTED `upload(wasm)` `errorResultXdr` bytes decode txInsufficientBalance (-7) at feeCharged 130861110 (composition requested 1000000 + resource 129861110, artifact-arithmetic-bound); decode fail-closed probes (junk never invents a code; the rehearsal's measured txBadSeq blob decodes to -5/txBadSeq at feeCharged 40674); the fee-solvency battery (measured 130861110 vs 35069800 refused PRE_SEND_SOLVENCY; fee+reserve boundary applied-and-bites at the single stroop; exact per-account minimum from subentry_count ??? 1 USDC trustline ??? 3 ?? 5000000); and the source contract (solvency consult precedes every submission; artifacts self-decode rejections; REJECTED/FAILED/TIMEOUT steps always downgrade the verdict) ?? then +17 measured into this suite 2026-11-09: +1 readback decoder ??? the typed-sim scvMap face (soroban-testnet measured 2026-11-08) decodes SOME ??? the OWNER-AUTHORIZED mainnet deploy contract battery, offline, every gate green + applied-and-bite: decision-doc literal parse, owner-flag gate, CI-artifact manifest identity (artifactName / runId / wasmSha256 / headSha ancestor-of-HEAD), fee floor + 1.5x policy, rehearsal-first gate, digest order-independence, the cross-language known-answer id, deterministic-salt idempotency fork/dup, artifact-surface paths, a source-level secret-discipline scanner (applied-and-bite), and the readback decoder's fail-closed branches) ?? then +15 measured into this suite 2026-11-07: +8 `test/integrations/stellar-soroban.test.mjs` (11???19 ??? XDR/type-code decode helpers + the authorized-lane call-site contract + the cross-language known-answer vector) + +7 `test/ci/doc-numbers.test.js` (the tests-claims bond: every doc suite-count statement must equal this snapshot's total) ?? then +3 dex-swap executed ??? the first SIGNED funded mainnet swap: `test/integrations/execution-evidence-contract.test.mjs` +3 ??? `docs/evidence/stellar-dex-swap-executed.json` digest-faithful (first SIGNED funded mainnet swap CONFIRMED through DEX-GATE/1 preflight: swap tx `ac2a7990b3387aab96b197c0c921d57756bd25d65ad0e75b93561ded640b9097`, ledger 65,338,112; trustline tx `09243337fd04d7ead8e369a8a5d5ef48648179db84608b262d5379f34fa72d76`, ledger 65,338,111; `4.0598146 XLM ??? 0.6306239 USDC`; wire read-backs equal `fee_charged` to the stroop) + the read-back arithmetic test + a tamper control ??? FIVE committed runner artifacts now digest-pinned by the contract; execution runner + measured artifact: `scripts/stellar-dex-swap-executed.mjs` ?? `docs/evidence/stellar-dex-swap-executed.json`; earlier: +6 soroban commit-executed: `test/integrations/stellar-soroban.test.mjs` +4 ??? the owner-authorized mainnet commit lane INVOKED via an injected submitter with the exact pair + wire-op decode, the fail-closed `ownerAuthorization` mainnet gate, `0x`-prefixed id acceptance, and the honest SUBMITTED/NOT_AUTHORIZED/REJECTED paths; `test/integrations/execution-evidence-contract.test.mjs` +2 ??? `docs/evidence/stellar-soroban-commit-executed.json` digest-faithful (INVOKED mainnet anchor on the exact pair) + a tamper control ??? FOUR committed runner artifacts now digest-pinned by the contract; execution runner + measured artifact: `scripts/stellar-soroban-commit-executed.mjs` ?? `docs/evidence/stellar-soroban-commit-executed.json` (tx `69044807410f65027c1227f4e525ad83f23a6cb1a2bb79790d82849c5dbc9fec`, ledger 65,337,373, on-chain read-back `{hash, seq}` exact); earlier: +6 executed-evidence contract `test/integrations/execution-evidence-contract.test.mjs` ??? the commit-pinned runner artifacts (STELLAR-AGENT/1 gate ?? DEX-GATE/1 on the REAL mainnet order book ?? GuardShield/1 decision arms) digest-checked with three tamper controls that each apply AND bite; earlier: +2 stellar-agent verifier `test/integrations/stellar-agent.test.mjs` ??? STELLAR-AGENT/1 fail-closed payment verifier over `packages/stellar/index.mjs`, policy/allowlist/deadline judged before any submit, receipts replayable via CGEP/1, honest DRY_RUN/NOT_BUILT status); earlier: +4 commit binding: `test/ci/perf-commit-binding.test.js` ??? every trend point records the git sha of the exact commit whose code was measured (`git rev-parse HEAD` of the measured checkout; no reachable git ??? NO sha recorded and NO data-sha fabricated anywhere, ceiling-respecting so a nested checkout can never inherit a parent repository's sha), `--badges` stamps each series badge with `data-sha` naming its latest point's measured-at commit while the aggregate wears none (its points may span commits), and the shared audit core `test/ci/badge-audit.mjs` bites by name on a wrong binding (STALE COMMIT BINDING), a missing one, a fabricated one (a sha the ledger never carried), and a single-commit claim on `perf??all`; then: +6 quick-start templates page: `docs/QUICKSTART.html` documents `create:integration` (default guard-floor mode vs `--dde` DDE-evidence + payout-gate mode) with LIVE derivations, not retyped prose ??? commands parsed from `scripts/create-integration.mjs` usage + `package.json`, both template trees fetched from the GitHub API contents endpoint, and the committed engine `templates/integration-dde/engine-dde.mjs` executed in the reader's tab on the committed ten-record fixture (verifyPins + verifyDeliveryFixture) with the acceptance predicate derived from `payout-gate.mjs`'s own bytes, red chips BY NAME on dead feeds, AR/EN throughout; `test/delivery/quickstart-page.test.js` executes parseUsage/parseModes/parseFileKey/buildFixture/statusBlock/checkRow/gateBlock in a VM on the real committed bytes AND drives the real engine subprocess (VERIFIED verdict agreed row-by-row, HOLD gate agreed with the real `payout-gate.mjs --json` exit-2 run) with 4 negative mutations each applying AND biting; + the DDE scaffold runners (`verify-dde.mjs`, `payout-gate.mjs`) now resolve their fixture via `fileURLToPath`, fixing the `pathname` percent-encoding break on Windows paths with spaces ??? the live examples run as-is anywhere; then: +4 main-badge-sync audit: `test/ci/main-badge-sync.test.js` audits badge???ledger sync at the tip main actually SERVES ??? ledger, module badge table and every `docs/badges/*.svg` read from the GIT COMMIT TREE via `git cat-file -p :path` / `git ls-tree` (HEAD on main checkouts, else `refs/remotes/origin/main`, failing named when neither is reachable), a staged newer ledger point bites STALE by name proving the audit reads committed bytes, and the audit core moved to `test/ci/badge-audit.mjs` so working-tree and commit-tree surfaces consume ONE derivation; earlier: +4 badge-freshness audit: `test/ci/badge-freshness.test.js` re-derives badge freshness at COMMIT granularity ??? for every BADGE_SERIES row (parsed from the module, budgets never retyped) the committed `docs/badges/*.svg` must show the ledger's LATEST recorded point and the ladder verdict color, `perf-all` must be the worst case of exactly the rendered set (nightly absence honored: no badge before its first point), any committed `perf-*` file the module does not declare is a criminal artifact (the CG-BDG/1 `specimen-*` family is explicitly out of scope), and 3 mutation controls each apply AND bite by name (stale value / lying color / phantom badge ??? a green badge the ladder calls yellow fails loudly); then: +3 aggregate perf badge: a fourth rendered badge `perf-all.svg` / README row `DDE perf ?? all` sums the always-on set's badges by worst case ??? all inside budget ??? green `all within budget`, any series past its budget but inside the 2x bar ??? yellow `N above budget`, beyond the bar ??? red `regression detected` ??? computed ONLY from badges the run rendered (the nightly load tail joins when it records) with the same fail-closed atomicity, contract-tested in `perf-badges.test.js` (+3); then: +5 first-drift trend alert: `test/ci/perf-drift-alert.test.js` ??? the trend gate's first breach names series, metric, current, baseline and ratio three ways (structured `alert` in the --json status, stderr block, and a breach row appended to the GitHub run summary when GITHUB_STEP_SUMMARY is set ??? the failing run's Summary page shows the offender beside the red gate, append-only and best-effort), a FAIL-gate report is a recording error and never dresses up as a regression, a green run emits no alert and touches no summary, and a breached run still records NOTHING; then: +8 live trend page: `docs/DDE-TREND.html` ??? the engine/wire/SDK median curves redrawn from the committed `benchmarks/perf-history.jsonl` on every load and re-polled every 60s so each tracker-bot point appends itself to the page without a redeploy, budgets derived live from `scripts/benchmark-trend.mjs` (a module budget bump moves the page in the same push), red named shim strips naming the exact URL whose ledger source is dark, AR/EN throughout; the contract executes the page's JS in a VM against the real bytes, drives the 60s poll and the refetch channel through the tokenizer too, and 6 page-mutation negative controls each apply AND bite; then: +4 depth-pair surfacing: the live perf page now shows the sequential median ??? p95-under-concurrency pair derived from the trend module, the respondent row carries `metric: "p95"` end to end, and the page queueing honesty framing + the unrecorded-point absence note are both contract-tested; then: +5 light load runner: a 50-way `POST /verify` burst whose gate requires the requested peak in flight AND an overlap factor (?? latency / wall time) ??? 2, refuses `--concurrency 1` as sequential by name, and fails on a p95 budget it cannot meet; +16 live-playground page contract: the page's engine copies are executed against the real packages through the full ACCEPTED/REJECTED/UNKNOWN job run and must agree state-by-state, the x402 gate must refuse before a signature on the browser crypto-shim, the shim must pass the FIPS vectors, and four page mutations plus one engine byte must each apply AND bite; +1 index card; earlier: +19 job-economy flow battery: CG-BUD/1 sibling-scope race + settlement/metered one-ceiling + hold/disposition matrix in `test/integrations/budget-acceptance-flow.test.mjs`, +1 claims-audit committed-bind negative control) | `npm test` ??? the pass total is machine-pinned: `scripts/run-tests.mjs` enforces it against `docs/state-snapshot.json` after every green run (drift = red), and `test/ci/current-state.test.js` re-measures the fast fields (Boundary audit | **PASS** (1531 files scanned, 0 violations)) | Agent Commerce family | **products 1-5 + named attack battery + TypeScript declaration surface + bilingual operator dashboard = BUILT ?? TEST_EXECUTED** (offline ?? deterministic ?? synthetic orders, placeholder credential, never a PAN); product 1 now ships as ONE composed authorization firewall ??? `packages/agent-commerce/firewall.mjs` (AC-FW/1): the PRE-EXECUTION gate `authorizeRequest` (committed policy against the DECLARED request ?? consent byte-match ?? caller-pinned window ?? single-use replay consulted, never consumed) + the POST-EXECUTION review `reviewExecution` over the family's own verdict, no fifth engine; product 5 (cross-chain execution attestation CGXA/1) is the offline attestation surface ??? its on-chain broadcast legs **OWNER-GATED / NOT_PERFORMED** (no broadcast surface exists in the module); npm publication **EXECUTED (2026-11-18):** all 14 `@coreguard/*` packages from the release scope are published on npmjs.org (`@0.1.0`), and `@coreguard/agent-commerce` is additionally published at `0.1.3` (2026-11-22, publish run 45031522325; registry `latest` = `0.1.3`) (corrected `mcpName` `io.github.EslaM-X/coreguard-agent-commerce` and stdio bin). MCP Registry listing **ACTIVE:** `io.github.EslaM-X/coreguard-agent-commerce@0.1.3` (republished 2026-11-22; registry reports the version as active and `isLatest`). On-chain broadcast legs for product 5 remain **OWNER-GATED / NOT_PERFORMED** (no broadcast surface in module); external adoption **NOT_BUILT** | `docs/surface-status.json` (24 surfaces) ?? `docs/AGENT-COMMERCE-SECURITY-SPEC-V1.md` ??2/??3b/??8/??9 ?? `docs/EVIDENCE-MATRIX.md` agent-commerce section ?? `packages/agent-commerce/firewall.mjs` ?? `packages/agent-commerce/policy-context.mjs` ?? `test/integrations/agent-commerce-firewall.test.mjs` ?? `examples/agent-commerce-firewall/artifacts.json` ?? `packages/agent-commerce/attest.mjs` ?? `test/integrations/agent-commerce-attestation.test.mjs` ?? `test/integrations/agent-commerce-attack-battery.test.mjs` | | Foundry contracts | **43 / 43 pass** | `forge test --match-path "test/contract/*"` (V2: 14 + EvidenceRegistryV3: 20 + 1 invariant suite carrying 5 live properties + 8 fuzz properties) | | Adversarial corpus | **73 / 73 pass** | `npm run corpus && npm run benchmark` | @@ -22,7 +22,7 @@ machine-measured, not estimated. Last verified: **2026-11-16**. | Rust/WASM/independent parity | PASS | `test/independent-verifier/` | | C verifier | PASS | `test/verifier-c/` (frozen reference, untouched) | | Frozen evidence/canonical hashes | UNCHANGED | conformance suite `test/conformance/` | -| Boundary audit (committed tree) | **1530 files, 0 violations** (+5 for the MCP 0.1.3 reliability surface (this push): `docs/agent-commerce-mcp-compatibility.md` ?? `docs/agent-commerce-mcp-security.md` ?? `docs/releases/0.1.3.md` ?? `examples/agent-commerce-mcp/README.md` ?? `examples/agent-commerce-mcp/run.mjs` ??? the three docs are fence-free prose, the example README's blocks are `text`, and the runnable example is referenced by command, so docsNode stays 139/83/32; re-measured against the committed tree; +2 for the pilot SOW and report form (this push): `docs/PILOT-SOW.md` · `docs/PILOT-REPORT-TEMPLATE.md` — both fence-free prose, so docsNode holds at 139/83/32; +3 arrived on main before this pin moved (#83 announcement note, #85 DDE SDK/API reference desk); +9 for the positioning and investment-readiness pack (this push): `COREGUARD-INVESTMENT-READINESS.md` ?? `docs/POSITIONING.md` ?? `docs/PRODUCT.md` ?? `docs/INVESTORS.md` ?? `docs/BUSINESS-MODEL.md` ?? `docs/PARTNERSHIPS.md` ?? `docs/TEAM.md` ?? `docs/SECURITY-REVIEWS.md` ?? `docs/EVIDENCE.md` ??? all fence-free prose, so docsNode holds at 139/83/32; +7 for the Salla Shop (Pi) pilot proposal package (this push): `docs/proposals/salla-shop-pi/README.md` ?? `TECHNICAL-PILOT-PROPOSAL-v1.0.md` (+ its `.ar.md`) ?? `MVP-SPEC-AND-TEST-PLAN.md` (+ its `.ar.md`) ?? `OUTREACH-DRAFTS.md` (+ its `.ar.md`) ??? all fence-free prose, so docsNode is unchanged; +2 from main since this branch opened (#76 published `docs/DOCS.html` ?? `docs/PARTNER.html`) - the audit counts the merged tree, so the pin moves with main; +5 for interop-demo/corpus-report/start-here (this push): `docs/START-HERE.md` ?? `docs/templates/AER1-CORPUS-RUN-REPORT-TEMPLATE.md` ?? `examples/agentbadge-receipt-seam/{README.md,run.mjs}` ?? `scripts/aer1-corpus-report.mjs` (+ docs-node contract/snapshot alignment); +2 for the anchor-layer vector (this push): `test/fixtures/var1-corpus-v1/anchor-unresolvable.json` · `test/integrations/var1-corpus-anchor-vector.test.mjs` — fence-free, so docsNode holds at 133/82/30; publication state for both vectors is kept in `docs/aer1-corpus-publication.json`+2 for the publication record and its guard (this push): `docs/aer1-corpus-publication.json` · `test/ci/corpus-publication-claim.test.js` — fence-free, so docsNode holds at 133/82/30; +2 for the CG-VECTOR/1 corpus vector (this push): `test/fixtures/var1-corpus-v1/present-consistent-nonconforming.json` · `test/integrations/var1-corpus-vector.test.mjs` — fence-free, so docsNode holds at 133/82/30; +3 for the public verify/numbers surfaces (2026-11-18 push): `scripts/public-numbers.mjs` · `docs/numbers.json` · `docs/NUMBERS.html` — all fence-free, so docsNode holds at 133/82/30; +2 for the luxe-pages identity merge/push (PR #65 follow-up fix, 2026-11-18): `docs/assets/coreguard-luxe.css` ?? `docs/assets/coreguard-luxe.js` (shared GitHub Pages assets); docsNode holds at 133/82/30; +4 for the npm-publication wave (2026-11-17 push): `packages/agent-commerce/package.json` · `packages/agent-commerce/bin/mcp.mjs` (stdio MCP bin wrapper) · `packages/agent-commerce/README.md` (its single `json` fence is MCP client configuration data, not a documented command) · `packages/agent-commerce/server.json` (MCP Registry server.json, schema 2025-12-11, validated against the live registry); +7 for the CG-TAS/1 trust-anchor wave (2026-11-17 push): `scripts/ladder/trust-anchor-set.mjs` ?? `scripts/ladder/provenance-fuzz.mjs` ?? `test/integrations/trust-anchor-set.test.mjs` ?? `test/integrations/provenance-fuzz.test.mjs` ?? `test/integrations/provenance-mutations.test.mjs` ?? `docs/AER1-TRUST-ANCHOR-SET-SPEC-V1-DRAFT.md` ?? `docs/owner-execution/REVIEWER-SELECTION-RUBRIC-2026-11-17.md` ??? the two docs are command-free prose, so docsNode holds at 133/82/30; +6 for the bilingual reviewer-deliverable contracts (2026-11-17 push): `test/ci/demo-script-contract.test.js` ?? `test/ci/bilingual-pairs.test.js` ?? `docs/i18n-pairs.json` ?? `docs/reviewer-demo-script-2026-09-ar.md` ?? `docs/sep-receipt-semantics-draft-2026-11-11-ar.md` ?? `docs/STELLAR-INTEGRATION-GUIDE-ar.md` ??? fence-free additions, docsNode unchanged; +4 for the adoption instruments (this push): `docs/loi/README.md` ?? `docs/loi/LOI-AER1-ZAMBO-2026-11-16.md` ?? `docs/loi/LOI-PILOT-STELLAR-2026-11-16.md` ?? `docs/AUDIT-READINESS-PACK-2026-11-16.md` ??? the command blocks are `text` fences, not `bash`, so docsNode holds at 133/81/30; +8 for the composed authorization firewall (this push): `packages/agent-commerce/firewall.mjs` ?? `packages/agent-commerce/policy-context.mjs` ?? `test/integrations/agent-commerce-firewall.test.mjs` ?? `examples/agent-commerce-firewall/{run.mjs,README.md,artifacts.json}` ?? `docs/agent-commerce-firewall-2026-11-16.md` ?? `docs/assets/badges/ci-1694-tests.svg` ??? all fence-free, so docsNode holds at 133/81/30; +25 for the agent-commerce family push: `docs/AGENT-COMMERCE-SECURITY-SPEC-V1.md` ?? `docs/agent-commerce-dashboard.html` ?? `docs/agent-commerce-console.html` ?? `docs/agent-commerce-funding-and-partnerships-2026-11-14.md` ?? the five dated instruments `docs/agent-commerce-openai-outreach-dossier-2026-11-15.md` ?? `docs/partner-outreach-messages-2026-11-15.md` ?? `docs/agentic-commerce-weekly-opportunities-2026-11-15.md` ?? `docs/agent-commerce-integration-guide-2026-11-15.md` ?? `docs/agent-commerce-tech-video-script-2026-11-15.md` (all fence-free so docsNode holds at 133/79/30) ?? `packages/agent-commerce/{index.mjs,index.d.ts,http.mjs,mcp.mjs,risk.mjs}` ?? 7 agent-commerce test files ?? 3 example files (`examples/agent-commerce-security-suite` README/artifacts/run.mjs) ?? `docs/assets/badges/ci-1673-tests.svg` (README pointed at it; the file was NEVER committed ??? the badge 404'd until the 2026-11-16 push shipped the count-matched `ci-1694-tests.svg` and re-pointed the href); then +1 for `docs/PILOT-KIT.md` (this push) - the two-page pilot offer: two-week scope, measurable success criteria, and the exact third-party-verifiable artifact, fence-free so docsNode holds at 133/79/30; +7 for the execution-trust layer: `examples/execution-trust/run.mjs` ?? `examples/execution-trust/verify-third-party.mjs` ?? `test/integrations/execution-trust-demo.test.mjs` ?? `docs/EXECUTION-TRUST-LAYER.md` ?? `docs/COMPETITIVE-LANDSCAPE.md` ?? `docs/SCF-BUILD-APPLICATION-V3.md` ?? `docs/DEVELOPER-QUICKSTART.md` ??? all fence-free, so docsNode holds at 133/79/30; +4 for the agentic-commerce approval-binding kit (this push): `examples/agent-commerce-approval-binding/run-demo.js` ?? `examples/agent-commerce-approval-binding/artifacts.json` ?? `examples/agent-commerce-approval-binding/README.md` ?? `docs/agent-commerce-moment-chatgpt-wallet-2026-11-14.md` ??? the offline demo (fence-free, docsNode unchanged) + the dated instrument (fence-free, zero test counts); +3 for the SCF RFP-2 submission kit (this push): `docs/SCF-46-RFP2-XDR-AUDIT-SUBMISSION-2026-11-13.md` ?? `scripts/scf-rfp2-sighting-repro.mjs` ?? `docs/evidence/scf-rfp2-sighting-repro.json` - the dated submission instrument (fence-free, docsNode unchanged) + its offline deterministic sighting-reproduction evidence (the js-stellar-sdk#1766 ordering-divergence class + 4 synthetic byte-round-trip-verified corpus entries, no key material committed); +4 for the PSAR/1 pre-sign receipt kit (this push): `packages/stellar/presign.mjs` ?? `test/integrations/stellar-presign.test.mjs` ?? `examples/stellar-presign/demo.mjs` ?? `docs/freighter-presign-integration-proposal-2026-11-12.md`; +1 for `docs/psar-security-review-2026-11-12.md` (the PSAR/1 critical self-review: the three security questions answered line-referenced with named boundaries); then +7 for the signed-envelope threat model, the replay vector + its generator, the field-tamper and replay tests, and the SCF readiness audit; +1 for `scripts/agent-gate-freighter-attest.mjs`; +4 for the browser demo ??? `examples/agent-gate-browser/serve.mjs`, `examples/agent-gate-browser/index.html`, `test/integrations/agent-gate-browser-demo.test.mjs`, `docs/assets/badges/ci-1539-tests.svg`; +2 for `scripts/agent-gate-testnet-sign.mjs` and `docs/evidence/agent-gate-testnet-signature.json`; the signed-envelope batch added `packages/agent-gate/adapters/stellar-xdr.mjs` ?? `packages/agent-gate/adapters/freighter.mjs` ?? `packages/agent-gate/verify-cli.mjs` ?? `packages/agent-gate/demo/cli-flow.mjs` ?? `scripts/agent-gate-bench.mjs` ?? `test/integrations/agent-gate-envelope.test.mjs` ?? `docs/assets/badges/ci-1539-tests.svg`; the untracked `examples/stellar-integration-pilot/` is NOT counted ??? it is not in `git ls-files`) (+1 parallel-session deliverable adopted in the reconciliation: `docs/deploy-stamp-id.txt` ??? the deploy stamp recorded by the owner's parallel Codebuff session; +4 owner-authorized deploy cycle: `docs/OWNER-DECISIONS-2026-11-08.md` ?? `scripts/stellar-soroban-authorized-deploy.mjs` ?? `test/integrations/stellar-soroban-authorized-deploy.test.mjs` ?? `docs/assets/badges/ci-1539-tests.svg`; +2 hardening-batch final reports, 2026-11-07 dated instruments SHA-pinned to `ea7e154`: `docs/FINAL-REPORT-2026-11-07-ar.md` ?? `docs/FINAL-REPORT-2026-11-07.md`; +3 ??? `docs/CLAIMS-TAXONOMY.md` ?? `test/ci/doc-numbers.test.js` ?? `docs/assets/badges/ci-1451-tests.svg` ?? then +2 CG-BDG/1 badge package: packages/badge/package.json ?? packages/badge/README.md; +1 funded-swap runner +1 measured executed artifact +1 CI badge plate +1 SCF-46 pack: `scripts/stellar-dex-swap-executed.mjs` ?? `docs/evidence/stellar-dex-swap-executed.json` ?? `docs/assets/badges/ci-1436-tests.svg` ?? `docs/SCF-46-INTEREST-FORM-READY-2026-11-06.md`; earlier: +1 CI badge docs/assets/badges/ci-1433-tests.svg; +2 soroban commit: scripts/stellar-soroban-commit-executed.mjs ?? docs/evidence/stellar-soroban-commit-executed.json; earlier: +7 executed-evidence artifacts & runners: scripts/stellar-agent-gate-executed.mjs ?? scripts/stellar-dex-gate-real.mjs ?? scripts/universal-shield-executed.mjs ?? test/integrations/execution-evidence-contract.test.mjs ?? docs/evidence/stellar-agent-gate-executed.json ?? docs/evidence/stellar-dex-gate-executed.json ?? docs/evidence/universal-dapp-shield-executed.json; from the trust-gate/legal-node/lab/bot surge: +1 docs/TRUST.md, +1 docs/VERIFY-BOT.md, +1 docs/LABS.md, +1 LICENSE.md; +1 test/fixtures/create-meta-v4.b64.txt from the CI-portability fix ??? the STELLAR/1 v4 create-result fixture moved IN-tree from a dev Temp path; +5 for the product-5 push (this push): `packages/agent-commerce/attest.mjs` ?? `test/integrations/agent-commerce-attestation.test.mjs` ?? `examples/agent-commerce-attestation/{run.mjs,README.md,artifacts.json}` (all fence-free so docsNode holds at 133/79/30)) | `npm run boundary:audit` ??? counted from `git ls-files` (the count a clean clone reproduces, not this dev disk), machine-pinned as `docs/state-snapshot.json#boundaryAudit` and re-measured by `test/ci/current-state.test.js` | +| Boundary audit (committed tree) | **1531 files, 0 violations** (+5 for the MCP 0.1.3 reliability surface (this push): `docs/agent-commerce-mcp-compatibility.md` ?? `docs/agent-commerce-mcp-security.md` ?? `docs/releases/0.1.3.md` ?? `examples/agent-commerce-mcp/README.md` ?? `examples/agent-commerce-mcp/run.mjs` ??? the three docs are fence-free prose, the example README's blocks are `text`, and the runnable example is referenced by command, so docsNode stays 139/83/32; re-measured against the committed tree; +2 for the pilot SOW and report form (this push): `docs/PILOT-SOW.md` · `docs/PILOT-REPORT-TEMPLATE.md` — both fence-free prose, so docsNode holds at 139/83/32; +3 arrived on main before this pin moved (#83 announcement note, #85 DDE SDK/API reference desk); +9 for the positioning and investment-readiness pack (this push): `COREGUARD-INVESTMENT-READINESS.md` ?? `docs/POSITIONING.md` ?? `docs/PRODUCT.md` ?? `docs/INVESTORS.md` ?? `docs/BUSINESS-MODEL.md` ?? `docs/PARTNERSHIPS.md` ?? `docs/TEAM.md` ?? `docs/SECURITY-REVIEWS.md` ?? `docs/EVIDENCE.md` ??? all fence-free prose, so docsNode holds at 139/83/32; +7 for the Salla Shop (Pi) pilot proposal package (this push): `docs/proposals/salla-shop-pi/README.md` ?? `TECHNICAL-PILOT-PROPOSAL-v1.0.md` (+ its `.ar.md`) ?? `MVP-SPEC-AND-TEST-PLAN.md` (+ its `.ar.md`) ?? `OUTREACH-DRAFTS.md` (+ its `.ar.md`) ??? all fence-free prose, so docsNode is unchanged; +2 from main since this branch opened (#76 published `docs/DOCS.html` ?? `docs/PARTNER.html`) - the audit counts the merged tree, so the pin moves with main; +5 for interop-demo/corpus-report/start-here (this push): `docs/START-HERE.md` ?? `docs/templates/AER1-CORPUS-RUN-REPORT-TEMPLATE.md` ?? `examples/agentbadge-receipt-seam/{README.md,run.mjs}` ?? `scripts/aer1-corpus-report.mjs` (+ docs-node contract/snapshot alignment); +2 for the anchor-layer vector (this push): `test/fixtures/var1-corpus-v1/anchor-unresolvable.json` · `test/integrations/var1-corpus-anchor-vector.test.mjs` — fence-free, so docsNode holds at 133/82/30; publication state for both vectors is kept in `docs/aer1-corpus-publication.json`+2 for the publication record and its guard (this push): `docs/aer1-corpus-publication.json` · `test/ci/corpus-publication-claim.test.js` — fence-free, so docsNode holds at 133/82/30; +2 for the CG-VECTOR/1 corpus vector (this push): `test/fixtures/var1-corpus-v1/present-consistent-nonconforming.json` · `test/integrations/var1-corpus-vector.test.mjs` — fence-free, so docsNode holds at 133/82/30; +3 for the public verify/numbers surfaces (2026-11-18 push): `scripts/public-numbers.mjs` · `docs/numbers.json` · `docs/NUMBERS.html` — all fence-free, so docsNode holds at 133/82/30; +2 for the luxe-pages identity merge/push (PR #65 follow-up fix, 2026-11-18): `docs/assets/coreguard-luxe.css` ?? `docs/assets/coreguard-luxe.js` (shared GitHub Pages assets); docsNode holds at 133/82/30; +4 for the npm-publication wave (2026-11-17 push): `packages/agent-commerce/package.json` · `packages/agent-commerce/bin/mcp.mjs` (stdio MCP bin wrapper) · `packages/agent-commerce/README.md` (its single `json` fence is MCP client configuration data, not a documented command) · `packages/agent-commerce/server.json` (MCP Registry server.json, schema 2025-12-11, validated against the live registry); +7 for the CG-TAS/1 trust-anchor wave (2026-11-17 push): `scripts/ladder/trust-anchor-set.mjs` ?? `scripts/ladder/provenance-fuzz.mjs` ?? `test/integrations/trust-anchor-set.test.mjs` ?? `test/integrations/provenance-fuzz.test.mjs` ?? `test/integrations/provenance-mutations.test.mjs` ?? `docs/AER1-TRUST-ANCHOR-SET-SPEC-V1-DRAFT.md` ?? `docs/owner-execution/REVIEWER-SELECTION-RUBRIC-2026-11-17.md` ??? the two docs are command-free prose, so docsNode holds at 133/82/30; +6 for the bilingual reviewer-deliverable contracts (2026-11-17 push): `test/ci/demo-script-contract.test.js` ?? `test/ci/bilingual-pairs.test.js` ?? `docs/i18n-pairs.json` ?? `docs/reviewer-demo-script-2026-09-ar.md` ?? `docs/sep-receipt-semantics-draft-2026-11-11-ar.md` ?? `docs/STELLAR-INTEGRATION-GUIDE-ar.md` ??? fence-free additions, docsNode unchanged; +4 for the adoption instruments (this push): `docs/loi/README.md` ?? `docs/loi/LOI-AER1-ZAMBO-2026-11-16.md` ?? `docs/loi/LOI-PILOT-STELLAR-2026-11-16.md` ?? `docs/AUDIT-READINESS-PACK-2026-11-16.md` ??? the command blocks are `text` fences, not `bash`, so docsNode holds at 133/81/30; +8 for the composed authorization firewall (this push): `packages/agent-commerce/firewall.mjs` ?? `packages/agent-commerce/policy-context.mjs` ?? `test/integrations/agent-commerce-firewall.test.mjs` ?? `examples/agent-commerce-firewall/{run.mjs,README.md,artifacts.json}` ?? `docs/agent-commerce-firewall-2026-11-16.md` ?? `docs/assets/badges/ci-1694-tests.svg` ??? all fence-free, so docsNode holds at 133/81/30; +25 for the agent-commerce family push: `docs/AGENT-COMMERCE-SECURITY-SPEC-V1.md` ?? `docs/agent-commerce-dashboard.html` ?? `docs/agent-commerce-console.html` ?? `docs/agent-commerce-funding-and-partnerships-2026-11-14.md` ?? the five dated instruments `docs/agent-commerce-openai-outreach-dossier-2026-11-15.md` ?? `docs/partner-outreach-messages-2026-11-15.md` ?? `docs/agentic-commerce-weekly-opportunities-2026-11-15.md` ?? `docs/agent-commerce-integration-guide-2026-11-15.md` ?? `docs/agent-commerce-tech-video-script-2026-11-15.md` (all fence-free so docsNode holds at 133/79/30) ?? `packages/agent-commerce/{index.mjs,index.d.ts,http.mjs,mcp.mjs,risk.mjs}` ?? 7 agent-commerce test files ?? 3 example files (`examples/agent-commerce-security-suite` README/artifacts/run.mjs) ?? `docs/assets/badges/ci-1673-tests.svg` (README pointed at it; the file was NEVER committed ??? the badge 404'd until the 2026-11-16 push shipped the count-matched `ci-1694-tests.svg` and re-pointed the href); then +1 for `docs/PILOT-KIT.md` (this push) - the two-page pilot offer: two-week scope, measurable success criteria, and the exact third-party-verifiable artifact, fence-free so docsNode holds at 133/79/30; +7 for the execution-trust layer: `examples/execution-trust/run.mjs` ?? `examples/execution-trust/verify-third-party.mjs` ?? `test/integrations/execution-trust-demo.test.mjs` ?? `docs/EXECUTION-TRUST-LAYER.md` ?? `docs/COMPETITIVE-LANDSCAPE.md` ?? `docs/SCF-BUILD-APPLICATION-V3.md` ?? `docs/DEVELOPER-QUICKSTART.md` ??? all fence-free, so docsNode holds at 133/79/30; +4 for the agentic-commerce approval-binding kit (this push): `examples/agent-commerce-approval-binding/run-demo.js` ?? `examples/agent-commerce-approval-binding/artifacts.json` ?? `examples/agent-commerce-approval-binding/README.md` ?? `docs/agent-commerce-moment-chatgpt-wallet-2026-11-14.md` ??? the offline demo (fence-free, docsNode unchanged) + the dated instrument (fence-free, zero test counts); +3 for the SCF RFP-2 submission kit (this push): `docs/SCF-46-RFP2-XDR-AUDIT-SUBMISSION-2026-11-13.md` ?? `scripts/scf-rfp2-sighting-repro.mjs` ?? `docs/evidence/scf-rfp2-sighting-repro.json` - the dated submission instrument (fence-free, docsNode unchanged) + its offline deterministic sighting-reproduction evidence (the js-stellar-sdk#1766 ordering-divergence class + 4 synthetic byte-round-trip-verified corpus entries, no key material committed); +4 for the PSAR/1 pre-sign receipt kit (this push): `packages/stellar/presign.mjs` ?? `test/integrations/stellar-presign.test.mjs` ?? `examples/stellar-presign/demo.mjs` ?? `docs/freighter-presign-integration-proposal-2026-11-12.md`; +1 for `docs/psar-security-review-2026-11-12.md` (the PSAR/1 critical self-review: the three security questions answered line-referenced with named boundaries); then +7 for the signed-envelope threat model, the replay vector + its generator, the field-tamper and replay tests, and the SCF readiness audit; +1 for `scripts/agent-gate-freighter-attest.mjs`; +4 for the browser demo ??? `examples/agent-gate-browser/serve.mjs`, `examples/agent-gate-browser/index.html`, `test/integrations/agent-gate-browser-demo.test.mjs`, `docs/assets/badges/ci-1539-tests.svg`; +2 for `scripts/agent-gate-testnet-sign.mjs` and `docs/evidence/agent-gate-testnet-signature.json`; the signed-envelope batch added `packages/agent-gate/adapters/stellar-xdr.mjs` ?? `packages/agent-gate/adapters/freighter.mjs` ?? `packages/agent-gate/verify-cli.mjs` ?? `packages/agent-gate/demo/cli-flow.mjs` ?? `scripts/agent-gate-bench.mjs` ?? `test/integrations/agent-gate-envelope.test.mjs` ?? `docs/assets/badges/ci-1539-tests.svg`; the untracked `examples/stellar-integration-pilot/` is NOT counted ??? it is not in `git ls-files`) (+1 parallel-session deliverable adopted in the reconciliation: `docs/deploy-stamp-id.txt` ??? the deploy stamp recorded by the owner's parallel Codebuff session; +4 owner-authorized deploy cycle: `docs/OWNER-DECISIONS-2026-11-08.md` ?? `scripts/stellar-soroban-authorized-deploy.mjs` ?? `test/integrations/stellar-soroban-authorized-deploy.test.mjs` ?? `docs/assets/badges/ci-1539-tests.svg`; +2 hardening-batch final reports, 2026-11-07 dated instruments SHA-pinned to `ea7e154`: `docs/FINAL-REPORT-2026-11-07-ar.md` ?? `docs/FINAL-REPORT-2026-11-07.md`; +3 ??? `docs/CLAIMS-TAXONOMY.md` ?? `test/ci/doc-numbers.test.js` ?? `docs/assets/badges/ci-1451-tests.svg` ?? then +2 CG-BDG/1 badge package: packages/badge/package.json ?? packages/badge/README.md; +1 funded-swap runner +1 measured executed artifact +1 CI badge plate +1 SCF-46 pack: `scripts/stellar-dex-swap-executed.mjs` ?? `docs/evidence/stellar-dex-swap-executed.json` ?? `docs/assets/badges/ci-1436-tests.svg` ?? `docs/SCF-46-INTEREST-FORM-READY-2026-11-06.md`; earlier: +1 CI badge docs/assets/badges/ci-1433-tests.svg; +2 soroban commit: scripts/stellar-soroban-commit-executed.mjs ?? docs/evidence/stellar-soroban-commit-executed.json; earlier: +7 executed-evidence artifacts & runners: scripts/stellar-agent-gate-executed.mjs ?? scripts/stellar-dex-gate-real.mjs ?? scripts/universal-shield-executed.mjs ?? test/integrations/execution-evidence-contract.test.mjs ?? docs/evidence/stellar-agent-gate-executed.json ?? docs/evidence/stellar-dex-gate-executed.json ?? docs/evidence/universal-dapp-shield-executed.json; from the trust-gate/legal-node/lab/bot surge: +1 docs/TRUST.md, +1 docs/VERIFY-BOT.md, +1 docs/LABS.md, +1 LICENSE.md; +1 test/fixtures/create-meta-v4.b64.txt from the CI-portability fix ??? the STELLAR/1 v4 create-result fixture moved IN-tree from a dev Temp path; +5 for the product-5 push (this push): `packages/agent-commerce/attest.mjs` ?? `test/integrations/agent-commerce-attestation.test.mjs` ?? `examples/agent-commerce-attestation/{run.mjs,README.md,artifacts.json}` (all fence-free so docsNode holds at 133/79/30)) | `npm run boundary:audit` ??? counted from `git ls-files` (the count a clean clone reproduces, not this dev disk), machine-pinned as `docs/state-snapshot.json#boundaryAudit` and re-measured by `test/ci/current-state.test.js` | | Docs-node contract | **140 executed ?? 89 skip-listed ?? 33 docs covered** (+6 executed ?? +1 skip-listed ?? +2 docs covered for interop-demo/corpus-report/start-here (this push): `docs/START-HERE.md` and `docs/templates/AER1-CORPUS-RUN-REPORT-TEMPLATE.md` now run in the docs-node sandbox (AER-1 corpus report via vendored fixture placeholders, execution-trust/var1-pilot-kit/agentbadge-seam staged); +0 for the CG-TAS/1 wave (2026-11-17 push): the frozen spec `docs/AER1-TRUST-ANCHOR-SET-SPEC-V1-DRAFT.md` and the owner instrument `docs/owner-execution/REVIEWER-SELECTION-RUBRIC-2026-11-17.md` are command-free prose (0 documented commands), docsNode unchanged; (+0 for the composed firewall docs (this push): the dated instrument `docs/agent-commerce-firewall-2026-11-16.md`, the example README `examples/agent-commerce-firewall/README.md` and spec ??7 item 11 are fence-free ??? 0 documented commands, docsNode unchanged; +1 executed ?? +1 covered doc: `docs/freighter-presign-integration-proposal-2026-11-12.md` - its single `npm run stellar:presign` fence executes the offline PSAR arc in the sandbox; +2 executed ?? +1 covered doc: CONTRIBUTING.md joins the covered-docs list - its claim-verification section adds the two documented verify-claims commands (`--manifest-check`, `--claim CG-BTY-001 --pr-url .../pull/51`) (PR #52); +6 executed ?? +1 covered doc: the Stellar DEX integration example (PR #51) - its bilingual README documents the three example commands in both the EN and the AR section, and the example README joins the covered-docs list; +2 executed from the signed-envelope documentation, where the gate spec's own verification arms entered the fence; +5 executed from the README's Stellar mainnet section: all five offline Stellar re-derivation arms joined the verify fence ??? `node scripts/stellar-soroban-commit-executed.mjs --verify` ?? `node scripts/stellar-dex-swap-executed.mjs --verify` ?? `node scripts/stellar-dex-gate-real.mjs --verify` ?? `node scripts/stellar-agent-gate-executed.mjs --verify` ?? `node scripts/universal-shield-executed.mjs --verify`; earlier: +4 executed/+3 skips from the trust-gate surge: `docs/TRUST.md` contributes the independent-verify ladder arms and `docs/LABS.md` the evidence/dispute package arms, each with named skips; `docs/VERIFY-BOT.md` and `LICENSE.md` are covered fence-free; earlier: (+2 executed: the README Badge Shield's `node scripts/badge-wall.mjs --audit` / regen arm re-derives all 7 plate digests offline; skips unchanged: the live Stellar-testnet demo (`npm run stellar:demo` / `examples/stellar-verify/demo.mjs`) is external-network, owned by `examples/stellar-verify/demo.mjs`, not a docs contract; existing: `docs/PRODUCTS.md` skip-listed as text catalog; the two reader pages `EXECUTIVE-SUMMARY.md`/`HOW-TO-EVALUATE.md` each contribute an executed `node demo.mjs`/`claims:audit`/`boundary:audit` arm and skip-listed `npm ci`/`npm test` = 2+4 skips) | `test/ci/docs-node-contract.test.js` ??? every documented `node`/`npm` command is EXECUTED or skip-listed with a named reason; pinned as `docs/state-snapshot.json#docsNode` | | Claim registry CG-CL/1 | **31 claims ?? 19 VERIFIED ?? 12 not ?? 0 violations** | `npm run claims:audit` ??? `docs/claims-registry.json`; 11 of 31 depend on an external outcome and sit at GATED/UNKNOWN/NOT_PERFORMED. `VERIFIED` is unreachable without evidence, and the audit verdict travels INSIDE the artifact | | Badge system CG-BDG/1 | **2 specimens ?? issuerCount 0 (third-party) ?? 1 first-party self-issuance CG-CS/1 SELF DF6E20C032A8 ?? nothing issued to any counterparty** | `npm run badge:verify` ??? `verifyBadge()` re-derives every digest from its record byte for byte, so a hand-edited SVG fails; `brand` is non-enumerable so a specimen cannot be laundered into an issued badge; issuance is an owner decision (`npm run badge --issue --record --i-am-the-owner-and-competent-to-issue` mints ISSUED artwork only from a committed 6/6 CG-CS/1 record and logs it in `docs/badge-issuances.json` ??? nothing auto-issues) | @@ -106,34 +106,34 @@ machine-measured, not estimated. Last verified: **2026-11-16**. | **v0.5.21 (2026-09-26, this session)** | **A???J closed with four honest-default decisions, and the release gate caught the gate** ??? the roadmap's remaining rows were prose: a claim ceiling nobody could audit, a badge nobody could verify, a partner journey nobody could replay, and a release gate that had never been run. Each is now a module, and each ships at its honest default. **(1) CG-CL/1 claim registry** (`npm run claims`): 28 claims derived from committed sources, six statuses, `UNKNOWN` allowed without evidence but `VERIFIED` never ??? 11 of 28 depend on an external outcome and sit at `GATED`/`UNKNOWN`/`NOT_PERFORMED`; the audit result travels *inside* the artifact so a reader of the committed file can see it was checked. **(2) CG-BDG/1 badge system** (`npm run badge:verify`): the artwork is the proof ??? `verifyBadge()` re-derives every digest from its record and compares byte for byte, so a single hand-edit is caught; `brand` is non-enumerable, so a specimen cannot be copied into an issued badge; two specimens ship (6/6 and 2/6) and `issuerCount` is 0. **(3) CG-PJ/1 partner journey** (`npm run partner:journey`): ten legs over one bundle; a clean run is `MATCH`, never `VERIFIED`, because L2 is the weakest link and inflating it would inflate the evidence. **(4) CG-RG/1 release gate** (`npm run release:gate`): 18 legs, and its own source is audited for network, credentials, and external-outcome dependencies on every invocation. **The gate then found four defects in itself, which is the part worth recording.** (a) *Five legs reported `Command failed` with zero output* ??? `npm.cmd` is a batch shim modern Node refuses to spawn without a shell, so `spawnSync` returned a null status and no error; the child now resolves npm's real JS entry and prints any spawn error. (b) *Four legs reported PASS on an empty denominator* ??? the counter read `c.pass` while the packages use `[name, boolean]` tuples, so webhook printed `0/8 invariants` **and passed**; cases are now tallied by an explicit shape reader and an unreadable case is a FAILURE. (c) *Three legs passed as "module loaded"* ??? proving nothing at all; a module that exposes no self-check now FAILs, and pure libraries are proven by naming the committed tests that import them. (d) *The gate's own audit matched its own regex* ??? the banned credential pattern written as a contiguous literal matches the line defining it, so the gate failed itself forever; the pattern is assembled from fragments. Rule: **a gate that can report green with no assertion behind it is worse than no gate, because it gets trusted** ??? all four classes are now locked by tests. Also this session: `docs/owner-decisions???` ??9 rewritten from "sign-off still required" to the three decisions *closed as held* (prices LOCKED ?? named integrator NONE ?? badge NOT ISSUED), with `CL-BUILD-ADOPTION-INDEPENDENT` mechanically failing the build if any of the three is ever marked `VERIFIED` while held; the control plane now reads the claim ceiling, the badge registry, and the committed gate verdict as committed sources; `docs/badge-system-2026-09-26.md` (Arabic-first + English mirror) documents what a badge never means. `npm test` ??? **1153/1153** (run-tests enforced, +58 over the previous cycle); boundary audit **817 files (committed tree), 0 violations**; release gate **18/18 legs, independence PASS**; docs-node **81 ?? 53 ?? 18**. One honesty defect caught in the act of shipping: a blanket number-sync `1095 ??? 1148` replace also rewrote the **v0.5.20 changelog row**, which would have made a past release report a test count it never measured ??? history is the one thing a sync script must never touch | -| **v0.5.22 (2026-09-26, this session)** | **The follow-up pass: every remaining stale number, and the gate's self-audit in CI** ??? shipping A???J left four surfaces still pointing at older measurements, which is the exact failure mode the snapshot exists to prevent, and one real gap: nothing ran the release gate on a push. **(1) Five stale figures found and corrected**: `docs/STATUS.md` ??current-state still read `1148/1148` (the earlier sync pass matched `1148/1148` but not the spaced `1148 / 1148` form, so it sailed through); `docs/owner-decisions??? ??1 still claimed `1061 pass` and `796 files`; `docs/phase-b-court-neutral-expansion??? still claimed `1061`; and `AGENTS.md` still carried the ancient `919 ??? 16 ??? 919 ??? 649` reviewer-packet line that its own "Files That Change Together" rule says tracks the latest measured count. Every one of them now reads from the snapshot. **(2) The gate now runs its own audit in CI** ??? `npm run release:gate:independence` is a step in the CI engine job, so the check that the gate reaches no network, no credential, and no external outcome happens on **every push**, not only when someone remembers to run it. The full 18-leg gate is deliberately not in CI: its `tests` leg re-runs the suite CI already runs, so adding it would double a ~9-minute job to prove nothing new. **(3) README gained a "Claim ceiling, badges & the release gate" section** with the seven honesty commands and the four rules the machine enforces ??? because the reviewer's first document was the one place the A???J surfaces were still invisible. **(4) `docs/verification-and-integration-platform-2026-09-26.md` ??15** documents all five honesty surfaces (CG-CL/1, CG-BDG/1, CG-PJ/1, CG-IR/1, CG-RG/1) with their artifacts, so the canonical map no longer stops at ??12 and leaves the gate undocumented. **The freeze record was checked and needed no re-pin**: `README.md` in `freeze-record-4.2.6.json` resolves to the *platform* README (record paths are relative to the record's own directory), and none of the 49 pins ??? including the three pinned bilingual dashboards ??? is a file this cycle touched; `validate-freeze` still reports **49/49 MATCH**. Docs-node rose **81 ??? 94 executed** with 19 docs covered (the new README commands plus `docs/badge-system-2026-09-26.md`), and the count moved with the snapshot in the same push, which is the whole point of the pin. `npm test` ??? **1153/1153** (unchanged: no test added this cycle); boundary audit **1530 files, 0 violations**; docs-node **94 ?? 53 ?? 19**; release gate **18/18, independence PASS**. The v0.5.21 row is left reporting `81 ?? 53 ?? 18` on purpose ??? that is what `823cd72` actually measured, and a changelog row is a historical fact, not a live counter | +| **v0.5.22 (2026-09-26, this session)** | **The follow-up pass: every remaining stale number, and the gate's self-audit in CI** ??? shipping A???J left four surfaces still pointing at older measurements, which is the exact failure mode the snapshot exists to prevent, and one real gap: nothing ran the release gate on a push. **(1) Five stale figures found and corrected**: `docs/STATUS.md` ??current-state still read `1148/1148` (the earlier sync pass matched `1148/1148` but not the spaced `1148 / 1148` form, so it sailed through); `docs/owner-decisions??? ??1 still claimed `1061 pass` and `796 files`; `docs/phase-b-court-neutral-expansion??? still claimed `1061`; and `AGENTS.md` still carried the ancient `919 ??? 16 ??? 919 ??? 649` reviewer-packet line that its own "Files That Change Together" rule says tracks the latest measured count. Every one of them now reads from the snapshot. **(2) The gate now runs its own audit in CI** ??? `npm run release:gate:independence` is a step in the CI engine job, so the check that the gate reaches no network, no credential, and no external outcome happens on **every push**, not only when someone remembers to run it. The full 18-leg gate is deliberately not in CI: its `tests` leg re-runs the suite CI already runs, so adding it would double a ~9-minute job to prove nothing new. **(3) README gained a "Claim ceiling, badges & the release gate" section** with the seven honesty commands and the four rules the machine enforces ??? because the reviewer's first document was the one place the A???J surfaces were still invisible. **(4) `docs/verification-and-integration-platform-2026-09-26.md` ??15** documents all five honesty surfaces (CG-CL/1, CG-BDG/1, CG-PJ/1, CG-IR/1, CG-RG/1) with their artifacts, so the canonical map no longer stops at ??12 and leaves the gate undocumented. **The freeze record was checked and needed no re-pin**: `README.md` in `freeze-record-4.2.6.json` resolves to the *platform* README (record paths are relative to the record's own directory), and none of the 49 pins ??? including the three pinned bilingual dashboards ??? is a file this cycle touched; `validate-freeze` still reports **49/49 MATCH**. Docs-node rose **81 ??? 94 executed** with 19 docs covered (the new README commands plus `docs/badge-system-2026-09-26.md`), and the count moved with the snapshot in the same push, which is the whole point of the pin. `npm test` ??? **1153/1153** (unchanged: no test added this cycle); boundary audit **1531 files, 0 violations**; docs-node **94 ?? 53 ?? 19**; release gate **18/18, independence PASS**. The v0.5.21 row is left reporting `81 ?? 53 ?? 18` on purpose ??? that is what `823cd72` actually measured, and a changelog row is a historical fact, not a live counter | -| **v0.5.23 (2026-09-26, this session)** | **The cycle's own regression: a documented command is an EXECUTED command** ??? v0.5.22 shipped the A???J commands in the README and went green on five of six workflows; the sixth, Node 18, came back `SIGTERM` after 8m25s with **no assertion, no test name and no output in the log**. Cause: the docs-node contract EXECUTES every documented command, and the new README block listed `npm run release:gate` ??? whose `tests` leg **is** `npm test`, which is the suite the contract itself lives inside. So documenting the gate made the contract spawn a nested full suite that re-entered the contract, recursively, until the runner was killed. **A timeout is the worst shape this can take**: `tests` leg `npm test` ?? no failing assertion ?? only an exit code, and exit-code-only triage on a killed process points at nothing. **(1) The fix is a SKIP entry with a named reason** ??? the gate is owned by the CI Engine leg's `release:gate:independence` step (v0.5.22) and by `pre-push-check.mjs`, and `npm run release:gate:independence` stays in the executed set because it is fast and self-contained. **(2) Two guards, because the obvious one is wrong twice over.** First, *body-only detection is vacuous*: `release:gate`'s package.json body is `node scripts/release-gate.mjs`, which names no test command at all ??? the `tests` leg is a string INSIDE that module, so a body-only heuristic classifies the bomb safe and the guard passes on it. The indirect half is now DECLARED and separately asserted to really reach the suite, so the declaration cannot rot into naming something harmless. Second, *mention is not invocation*: classifying a script by searching its whole source for `npm test` flags `claims`, `claims:audit`, `publish:check` and `integration:states` ??? all of which merely MENTION the suite in a comment or a usage string. A guard that cries wolf on safe commands gets ignored, and then ignored for the real one, so the mechanical half reads only package.json bodies and a test pins those four as NOT runners. **(3) The guard then failed a third way, and only the negative control found it** ??? it read files without normalizing CRLF, so `extractBashFences` (which matches a `bash` + newline) saw ZERO fences in every CRLF-checked-out file. The guard was therefore green on the bomb in this Windows checkout and would have fired on Linux CI ??? a check whose behaviour depends on the checkout's line endings is [C3] in miniature. **The rule now written into AGENTS.md as [C31]: a guard is proven by removing the thing it guards, not by passing.** All three defects presented as a green guard; every one surfaced from deleting the SKIP entry and expecting red, then auditing which scripts the classifier actually flagged. Docs-node moves **94 ??? 93 executed ?? 53 ??? 54 skip-listed** ('gate' to the skip table, 2 guard tests added), and the v0.5.22 row keeps its 94/53/19 because that is what `83f851e` measured. `npm test` ??? **1155/1155** (+2 guard tests); boundary audit **1530 files, 0 violations**; release gate **18/18, independence PASS**; prepush **6/6**. The honest reading of this cycle: the A???J work was correct and the *documentation* of it broke CI, which is the mirror image of the lesson the roadmap was built to teach ??? a claim is only worth what the machine can re-check, and a documented command is a claim the machine will now execute. | -| **v0.5.24 (2026-09-26, this session)** | **Three real defects found by auditing instead of assuming, and the reviewer's first document finally machine-checked** ??? the roadmap was closed and the suite green, so this pass stopped adding surfaces and went looking for what was still wrong. Three things were. **(1) The partner journey contradicted the committed artifact.** CG-PJ/1's findings leg reported **7 OPEN** while `docs/risk-findings.json` said **4**: the leg called `deriveFindings({ registry })`, and that function takes every committed source as an INPUT and defaults a missing one to `{}` ??? the absent snapshot silently collapsed RF-006/007/008 (boundary audit, suite pin, docs-node/harness) to OPEN. The module's own `build()` reads all three committed sources exactly as the CLI does; the leg now goes through it. Worth naming what the bug did: it overstated risk, which is the safe direction, and it was still a defect ??? a reviewer-facing number may not disagree with the recorded one in either direction. Nothing caught it: the artifact is pinned to `build()` by `ladder-v03`, but the journey was never pinned to the artifact, which is the gap a per-file invariant always leaves. **(2) `docs/STATUS.md` had ZERO machine checks.** It calls itself the authoritative source of truth, states that every metric in it is machine-measured, and is the first document a reviewer opens ??? and all thirteen of its rows were tests and contracts, with the entire claim/badge/gate layer absent. It now carries ten honesty rows (boundary audit ?? docs-node ?? CG-CL/1 ?? CG-BDG/1 ?? CG-PJ/1 ?? CG-IR/1 ?? CG-RF/1 ?? CG-RP/1 ?? CG-RG/1 ?? CG-CR/1), each reading its value from the committed artifact. **(3) The decisions record numbered its sections 1,2,3,4,5,6,7,9,8** ??? ??? fixed by moving the '9' block into place, with no renumbering, so every existing '??9' citation stays valid. **The guard for (2) failed three times before it worked, which is the real content of this row.** The first draft asserted `table.includes(String(claims.length))` and could not fail: "28" occurs incidentally in that table and "0" occurs in half of it, so corrupting the claims total to 27 or revenue to $4,200 stayed green; the changelog guard failed identically, because the document still CONTAINED "v0.5.22" in the next row's prose after the row itself was deleted. **A substring is not a location.** Each measurement is now bound to the row whose label names it, that row must state the artifact's value, and exactly one such row may exist so a stale duplicate cannot hide beside a fresh one. Twelve negative controls ?? corrupt a count, delete a row, duplicate a row, cite a fictional npm script, plant a non-$0 figure, drop a changelog row ??? now each turn the suite red, and the battery prints "mutation applied" separately from "bit" because a control whose mutation never landed is as worthless as a guard that cannot fail. Two of the twelve did not bite on the first run. The row-scoped rewrite then caught a real omission in the row I had just written (the gate row omitted its 18 self-audited legs) **on its first execution** ??? the guard found the author's error, not only a future regression. Filed as AGENTS.md [C32], the third face of [C30]/[C31]. `npm test` ??? **1162/1162** (+6: 5 STATUS-truth, 1 journey/artifact agreement, the latter proven by reverting the fix and watching it report `actual: 7, expected: 4`); boundary audit **1530 files, 0 violations**; docs-node **93 ?? 54 ?? 19**; release gate **18/18, independence PASS**; prepush **6/6**. The v0.5.21??v0.5.23 rows keep 1153/1155 and their own docs-node figures ??? they record what each commit measured, and the new test enforces that exemption by requiring each to survive as a ROW rather than as a prose mention. | -| **v0.5.25 (2026-09-26, this session)** | **Two things the tree was owed: a lost branch in the L1 rule, and the AIE-1 incident surface, finished** ??? **(1) The L1 chain rule was TRUE and INCOMPLETE in all four places it is stated.** The machine has three outcomes ?? no authority `UNKNOWN/NO_CHAIN_EVIDENCE` ?? authority asked and does not know the hash `MISMATCH/TX_NOT_FOUND` ?? evidence too malformed to ask with `UNKNOWN/EVIDENCE_INCONSISTENT` ??? and every reviewer-facing surface compressed that to two ("a format-valid receipt nobody confirmed is `UNKNOWN`", under a README heading that reads "four rules **the machine enforces, not the prose**"). Every compressed version was true, which is exactly why it survived review: the branch it dropped is `MISMATCH`, the strongest signal the system produces, so the summary filed a real contradiction under its weakest verdict. The rule now hinges on the only question that actually separates them ??? **was anyone asked** ??? in `README.md`, ??1 and ??14 rule 2 and ??15.4 of the platform doc, ??3 of the decisions record, and the L0-L4 bullet. `test/ci/receipt-semantics-doc.test.js` derives the three codes from `verifyReceipt()` at run time, so the binding is to behaviour and not to a copy of the prose. Its 6 negative controls include a CODE-side mutation (flip the asked-and-contradicted return to `UNKNOWN`), because a doc binding that only reads docs cannot tell a correct rule from a stale one. Filed as AGENTS.md [C33]. **(2) AIE-1, the agent-incident verification surface, was mid-flight in the tree** and is now closed: `docs/agent-incident-evidence.md` (one endpoint, one evidence bundle, one report schema, replayable from a cold clone) with `test/delivery/agent-incident-evidence.test.js` (+4 ?? the spec's fences are registered in the doc-curl contract, its quoted verdicts match the live engine byte-for-byte, replay is byte-identical across two runs, and a tamper replay names the flipped byte), cross-linked from `INTEGRATION.md`, `docs/delivery-dispute-boundary.md` and the Arabic/EN `docs/index.html`. Two housekeeping defects were also closed with it: 9 `.tmp-aie-*` scratch dumps (a fixture, two `.b64` payloads, a server log) had been swept into the index by a bulk `git add -A` and are now untracked behind a `.tmp-*` ignore rule ??? a scratch output is not a deliverable ??? and the docs-node triple moved 93??54??19 ??? 94??55??20 as the new doc's commands execute. **One process note worth keeping**: mid-cycle the release gate recorded a legitimate `GATE_FAIL` (its `tests` leg was red on snapshot drift), and that record then deadlocked the suite ??? the gate's `tests` leg runs `npm test`, which asserts the table states what the artifact says, so a failing artifact keeps its own suite red. It is broken the honest way ??? restore the last real record, get the suite green, then re-run the gate for a fresh one ??? and the re-run reproduced the committed bytes exactly, which is the timestamp-free contract doing its job. `npm test` ??? **1171/1171** (+9: 5 receipt-semantics, 4 AIE-1); boundary audit **1530 files, 0 violations**; docs-node **94 ?? 55 ?? 20**; release gate **18/18, independence PASS**; prepush **6/6**. v0.5.21??v0.5.24 rows keep their own counts ??? they record what each commit measured | +| **v0.5.23 (2026-09-26, this session)** | **The cycle's own regression: a documented command is an EXECUTED command** ??? v0.5.22 shipped the A???J commands in the README and went green on five of six workflows; the sixth, Node 18, came back `SIGTERM` after 8m25s with **no assertion, no test name and no output in the log**. Cause: the docs-node contract EXECUTES every documented command, and the new README block listed `npm run release:gate` ??? whose `tests` leg **is** `npm test`, which is the suite the contract itself lives inside. So documenting the gate made the contract spawn a nested full suite that re-entered the contract, recursively, until the runner was killed. **A timeout is the worst shape this can take**: `tests` leg `npm test` ?? no failing assertion ?? only an exit code, and exit-code-only triage on a killed process points at nothing. **(1) The fix is a SKIP entry with a named reason** ??? the gate is owned by the CI Engine leg's `release:gate:independence` step (v0.5.22) and by `pre-push-check.mjs`, and `npm run release:gate:independence` stays in the executed set because it is fast and self-contained. **(2) Two guards, because the obvious one is wrong twice over.** First, *body-only detection is vacuous*: `release:gate`'s package.json body is `node scripts/release-gate.mjs`, which names no test command at all ??? the `tests` leg is a string INSIDE that module, so a body-only heuristic classifies the bomb safe and the guard passes on it. The indirect half is now DECLARED and separately asserted to really reach the suite, so the declaration cannot rot into naming something harmless. Second, *mention is not invocation*: classifying a script by searching its whole source for `npm test` flags `claims`, `claims:audit`, `publish:check` and `integration:states` ??? all of which merely MENTION the suite in a comment or a usage string. A guard that cries wolf on safe commands gets ignored, and then ignored for the real one, so the mechanical half reads only package.json bodies and a test pins those four as NOT runners. **(3) The guard then failed a third way, and only the negative control found it** ??? it read files without normalizing CRLF, so `extractBashFences` (which matches a `bash` + newline) saw ZERO fences in every CRLF-checked-out file. The guard was therefore green on the bomb in this Windows checkout and would have fired on Linux CI ??? a check whose behaviour depends on the checkout's line endings is [C3] in miniature. **The rule now written into AGENTS.md as [C31]: a guard is proven by removing the thing it guards, not by passing.** All three defects presented as a green guard; every one surfaced from deleting the SKIP entry and expecting red, then auditing which scripts the classifier actually flagged. Docs-node moves **94 ??? 93 executed ?? 53 ??? 54 skip-listed** ('gate' to the skip table, 2 guard tests added), and the v0.5.22 row keeps its 94/53/19 because that is what `83f851e` measured. `npm test` ??? **1155/1155** (+2 guard tests); boundary audit **1531 files, 0 violations**; release gate **18/18, independence PASS**; prepush **6/6**. The honest reading of this cycle: the A???J work was correct and the *documentation* of it broke CI, which is the mirror image of the lesson the roadmap was built to teach ??? a claim is only worth what the machine can re-check, and a documented command is a claim the machine will now execute. | +| **v0.5.24 (2026-09-26, this session)** | **Three real defects found by auditing instead of assuming, and the reviewer's first document finally machine-checked** ??? the roadmap was closed and the suite green, so this pass stopped adding surfaces and went looking for what was still wrong. Three things were. **(1) The partner journey contradicted the committed artifact.** CG-PJ/1's findings leg reported **7 OPEN** while `docs/risk-findings.json` said **4**: the leg called `deriveFindings({ registry })`, and that function takes every committed source as an INPUT and defaults a missing one to `{}` ??? the absent snapshot silently collapsed RF-006/007/008 (boundary audit, suite pin, docs-node/harness) to OPEN. The module's own `build()` reads all three committed sources exactly as the CLI does; the leg now goes through it. Worth naming what the bug did: it overstated risk, which is the safe direction, and it was still a defect ??? a reviewer-facing number may not disagree with the recorded one in either direction. Nothing caught it: the artifact is pinned to `build()` by `ladder-v03`, but the journey was never pinned to the artifact, which is the gap a per-file invariant always leaves. **(2) `docs/STATUS.md` had ZERO machine checks.** It calls itself the authoritative source of truth, states that every metric in it is machine-measured, and is the first document a reviewer opens ??? and all thirteen of its rows were tests and contracts, with the entire claim/badge/gate layer absent. It now carries ten honesty rows (boundary audit ?? docs-node ?? CG-CL/1 ?? CG-BDG/1 ?? CG-PJ/1 ?? CG-IR/1 ?? CG-RF/1 ?? CG-RP/1 ?? CG-RG/1 ?? CG-CR/1), each reading its value from the committed artifact. **(3) The decisions record numbered its sections 1,2,3,4,5,6,7,9,8** ??? ??? fixed by moving the '9' block into place, with no renumbering, so every existing '??9' citation stays valid. **The guard for (2) failed three times before it worked, which is the real content of this row.** The first draft asserted `table.includes(String(claims.length))` and could not fail: "28" occurs incidentally in that table and "0" occurs in half of it, so corrupting the claims total to 27 or revenue to $4,200 stayed green; the changelog guard failed identically, because the document still CONTAINED "v0.5.22" in the next row's prose after the row itself was deleted. **A substring is not a location.** Each measurement is now bound to the row whose label names it, that row must state the artifact's value, and exactly one such row may exist so a stale duplicate cannot hide beside a fresh one. Twelve negative controls ?? corrupt a count, delete a row, duplicate a row, cite a fictional npm script, plant a non-$0 figure, drop a changelog row ??? now each turn the suite red, and the battery prints "mutation applied" separately from "bit" because a control whose mutation never landed is as worthless as a guard that cannot fail. Two of the twelve did not bite on the first run. The row-scoped rewrite then caught a real omission in the row I had just written (the gate row omitted its 18 self-audited legs) **on its first execution** ??? the guard found the author's error, not only a future regression. Filed as AGENTS.md [C32], the third face of [C30]/[C31]. `npm test` ??? **1162/1162** (+6: 5 STATUS-truth, 1 journey/artifact agreement, the latter proven by reverting the fix and watching it report `actual: 7, expected: 4`); boundary audit **1531 files, 0 violations**; docs-node **93 ?? 54 ?? 19**; release gate **18/18, independence PASS**; prepush **6/6**. The v0.5.21??v0.5.23 rows keep 1153/1155 and their own docs-node figures ??? they record what each commit measured, and the new test enforces that exemption by requiring each to survive as a ROW rather than as a prose mention. | +| **v0.5.25 (2026-09-26, this session)** | **Two things the tree was owed: a lost branch in the L1 rule, and the AIE-1 incident surface, finished** ??? **(1) The L1 chain rule was TRUE and INCOMPLETE in all four places it is stated.** The machine has three outcomes ?? no authority `UNKNOWN/NO_CHAIN_EVIDENCE` ?? authority asked and does not know the hash `MISMATCH/TX_NOT_FOUND` ?? evidence too malformed to ask with `UNKNOWN/EVIDENCE_INCONSISTENT` ??? and every reviewer-facing surface compressed that to two ("a format-valid receipt nobody confirmed is `UNKNOWN`", under a README heading that reads "four rules **the machine enforces, not the prose**"). Every compressed version was true, which is exactly why it survived review: the branch it dropped is `MISMATCH`, the strongest signal the system produces, so the summary filed a real contradiction under its weakest verdict. The rule now hinges on the only question that actually separates them ??? **was anyone asked** ??? in `README.md`, ??1 and ??14 rule 2 and ??15.4 of the platform doc, ??3 of the decisions record, and the L0-L4 bullet. `test/ci/receipt-semantics-doc.test.js` derives the three codes from `verifyReceipt()` at run time, so the binding is to behaviour and not to a copy of the prose. Its 6 negative controls include a CODE-side mutation (flip the asked-and-contradicted return to `UNKNOWN`), because a doc binding that only reads docs cannot tell a correct rule from a stale one. Filed as AGENTS.md [C33]. **(2) AIE-1, the agent-incident verification surface, was mid-flight in the tree** and is now closed: `docs/agent-incident-evidence.md` (one endpoint, one evidence bundle, one report schema, replayable from a cold clone) with `test/delivery/agent-incident-evidence.test.js` (+4 ?? the spec's fences are registered in the doc-curl contract, its quoted verdicts match the live engine byte-for-byte, replay is byte-identical across two runs, and a tamper replay names the flipped byte), cross-linked from `INTEGRATION.md`, `docs/delivery-dispute-boundary.md` and the Arabic/EN `docs/index.html`. Two housekeeping defects were also closed with it: 9 `.tmp-aie-*` scratch dumps (a fixture, two `.b64` payloads, a server log) had been swept into the index by a bulk `git add -A` and are now untracked behind a `.tmp-*` ignore rule ??? a scratch output is not a deliverable ??? and the docs-node triple moved 93??54??19 ??? 94??55??20 as the new doc's commands execute. **One process note worth keeping**: mid-cycle the release gate recorded a legitimate `GATE_FAIL` (its `tests` leg was red on snapshot drift), and that record then deadlocked the suite ??? the gate's `tests` leg runs `npm test`, which asserts the table states what the artifact says, so a failing artifact keeps its own suite red. It is broken the honest way ??? restore the last real record, get the suite green, then re-run the gate for a fresh one ??? and the re-run reproduced the committed bytes exactly, which is the timestamp-free contract doing its job. `npm test` ??? **1171/1171** (+9: 5 receipt-semantics, 4 AIE-1); boundary audit **1531 files, 0 violations**; docs-node **94 ?? 55 ?? 20**; release gate **18/18, independence PASS**; prepush **6/6**. v0.5.21??v0.5.24 rows keep their own counts ??? they record what each commit measured | | **v0.5.26 (2026-09-27, this session)** | **A documented freeze gap that was not a gap: the recovery pointer existed, and nothing read it** ??? AGENTS.md carried a standing warning that deleting a doc pinned by an older freeze record makes that record "unverifiable for those entries", and flagged the whole thing as an open known gap. Both halves were wrong, and the second was wrong in the interesting direction: the two files `freeze-record-4.2.5.json` pins (`v4.2.5-closure/engine-semantics-contract.md`, `external-evidence-model.md`) **were already deleted**, in `5a89f2b` ??? the very commit that introduced 4.2.6 ??? yet both recorded SHA-256 values still match the blobs at `5a89f2b~1`. A pinned file's bytes stay verifiable from history whatever happens to the working tree; deletion costs only *tree-reachability*. The genuine risk is the silent one: bytes reachable only through a ref nobody wrote down. A survey of all 136 pins across 5 records put the real number on the table ??? **134 in the current tree, 2 absent but hash-verifiable, 0 unverifiable** ??? and the audit script first reported those 2 as dead because it handed `git show` Windows backslashes out of `path.join`, a failure that reads exactly like a missing file. 4.2.6's `scopeGapsClosed` now names both files and the recovery ref, without touching `frozenAtUtc` or a single pin (49/49 still verify), and `test/verifier-c/freeze-record-reachability.test.mjs` turns that note into a contract: every pin in every record is either in the tree or hash-verifiable from a **named** ref, and any pin absent from the tree must be documented in the active record. `scopeGapsClosed` had **no reader at all** until this change, so the note was previously worth nothing. 5 negative controls (delete a file the active record pins ?? drop the note ?? point it at a wrong ref ?? shrink a pin ?? corrupt a recorded hash) each turn the suite red, and the control harness now restores every mutated file byte-for-byte ??? after a first draft ran `git checkout -- .` and silently destroyed the uncommitted record edit. Two stale literals fixed in passing: AGENTS.md's own `47 = 28+19` (real: 49 = 30+19) and `1176`, plus the `46/46` frozen into `validate-freeze.test.mjs`'s header table while its assertions were already deriving the count ??? documentation that lies right beside a check that cannot. Measured: **1180/1180** ?? **833 files ?? 0 violations** ?? docs-node 94/55/20. | | **v0.5.27 (2026-09-27, this session)** | **A number I fixed by hand was still an unguarded number ??? and one of them guarded nothing at all** ??? v0.5.26 hand-corrected two literals in `AGENTS.md` (`1176`???1187-class drift, and `47 = 28+19` ??? the record's real `49 = 30+19`) and left them exactly as rot-prone as before. That is the [C32] lesson applied to the file that teaches it: the fix was to the value, not to the class. `test/ci/agents-numbers.test.js` now **derives** each live figure in AGENTS.md from the one committed source that owns it and requires it inside the single line whose label names it ??? engine version ??? scenario count ??? test count ??? validator checks (from `freeze-record-4.2.6.json` + `negative-tests.json` + `state-snapshot.json`, `649` parsed out of the record's own `cycleEvidence.nodeValidator` rather than retyped), the pin count and its release/quarantine split, the SelfTest count (counted from `selftest.tap`'s `ok ` lines, not read from prose), and the payout i18n dictionary size. Two of these had **already rotted** (`919???6???` and `47 = 28+19`), so this is the second measured instance, not a hypothetical. It also cross-checks the record's own `cycleEvidence` against the artifacts, so the reviewer-facing claim cannot outrun the bytes. **14 negative controls, each red**, and they cover both directions: the doc rotting (`NC1`-`NC5`: stale count, stale split, a chain trimmed to 2 of 4 values, a **duplicate line** planted beside the fresh one, an anchor renamed away) and the *source* rotting so the doc becomes the liar (`NC6`-`NC10`: snapshot count, engine version, a dropped quarantine pin, a record claiming 24 self-test checks against 21 `ok ` lines, 19 scenarios against 16). The last two (`NC11`, `NC12`) delete the array key and every `ok ` line to prove the guard **refuses to derive 0** rather than asserting a confident false number ??? the [C30] zero-denominator trap, caught live during this build when a wrong key name made the first draft try to state `0` scenarios. **Separately, a cited invariant turned out not to exist:** AGENTS.md told two sessions that a hand-edit "silently breaks the 637/637 node pairing". Nothing in the tree derives or checks 637; the only enforced pairing is `test/p2/governance-dashboard-i18n.test.js` over the `PAYOUT_GATE_I18N` dictionary (**11 keys**), while the full `coreguard-gate41-visual.html` / `-en.html` pair is **unverified by machine** ??? the AR file carries 278 `data-i18n` attributes and the EN sister carries zero, holding literal English, so no dictionary exists to pair. Both citations are corrected and that pair is now labelled unguarded rather than falsely guaranteed. Measured: **1187/1187** ?? **834 files ?? 0 violations** ?? docs-node 94/55/20. | | **v0.5.28 (2026-09-27, this session)** | **"Unguarded" is a finding, not an excuse: the real invariant existed and was 277 keys wide** ??? v0.5.27 corrected AGENTS.md's dead `637/637` pairing claim and labelled the AR/EN dashboard pair **unverified by machine**. That was the honest reading, and stopping there would have repeated the mistake the repo already documents: *"The fix here was to BUILD the surface ??? not to reword the claim."* Probing the page found the invariant it actually ships with. `docs/coreguard-gate41-visual.html` has **one runtime dictionary**, `D = {"nodes": {"": {ar, en}}, "attrs": ???}`, and `apply()` iterates it replacing `[data-i18n=""]` `.innerHTML` ??? so the contract is a **bijection**, and it holds perfectly: **277 static markup keys ??? 277 entries, 0 missing, 0 orphan**. Two candidate defects turned out to be **correct behavior**, and the temptation to "fix" either would have damaged a live investor-facing page. Entries 84/93/104 carry an `.ar` with no Arabic because they are the bare RTL arrows `???`/`???` ??? flipping the glyph is the point. And **29** entries embed a *nested* `data-i18n` inside their own `.ar` value; the outer entry replaces `innerHTML` wholesale so the inner attribute is redundant and order-dependent, yet every inner key also appears in static markup (the bijection proves it), so nothing is orphaned and rendering is correct. `test/p2/gate41-visual-i18n.test.js` therefore pins the **29 as a count, not as zero** ??? changing it must be a deliberate act, not an edit that lands unnoticed. Per [C27] it also asserts the **mechanism**, not just the data: `apply()` must still iterate `D.nodes` and still select by the iterated key, because the dictionary can be flawless while the switcher no longer reads it. **9 negative controls, and one of them caught a hole in this very contract**: pasting a whole English sentence into the `.ar` slot did **not** fail, because the first "language-neutral" rule allowed letters, spaces and punctuation ??? i.e. any ASCII. The rule is now **no WORD** (two consecutive ASCII letters), which catches an untranslated English string while still passing the bare arrows. A guard that cannot fail is not a guard ([C32]); the control is what turned this one real. **Left explicitly unguarded, and labelled as such:** the EN sister `coreguard-gate41-visual-en.html` carries 0 `data-i18n` attributes and no dictionary (literal English), so nothing cross-checks that it says the same thing as the AR dictionary's `en` values. Measured: **1193/1193** ?? **835 files ?? 0 violations** ?? docs-node 94/55/20 ?? freeze 49/49. | -| **v0.5.34 (2026-10-22, this session)** | **A load number that cannot be faked by a sequential loop** ??? `scripts/benchmark-dde-load.mjs` (`npm run benchmark:dde-load`) keeps **50 requests outstanding** against `POST /verify` until 200 have completed and reports the latency distribution of that burst, because the sequential wire benchmark measures the friendly case (one request, no sharing of the event loop, the socket pool or the JSON parser). The gate fails closed on four measured facts, not on prose: every response must be `200 VERIFIED` with the decision intact (perf is measured on the real gate), the observed peak in flight must equal the requested depth, **?? latency / wall time must be ??? 2** ??? a `for ??? await` rewrite reports overlap ??? 1 no matter how fast the server is, so a sequential loop cannot wear the concurrent label ??? and p95 must stay under its budget. `--concurrency 1` is refused by name rather than accepted as a load run. Measured on the dev box: **200/200 VERIFIED ?? peak 50/50 ?? overlap 48x ?? 729.8 req/s ?? median 64.1 ms ?? p95 93.0 ms** (p99 97.8 ?? max 98.8) in 274 ms wall time, against the sequential runner's p95 of ~2.4???3.2 ms: the delta is queueing on one shared event loop, which is the number an integrating platform actually experiences under a batch, and the report says so. The first live run failed honestly ??? 50 ?? 429 ??? because the warmup burst shares the fixed window with the measured burst and the granted limiter ceiling had not included it; the limiter is a REAL guard, so it is sized for the run and disclosed in the report (`250 req / 60s`) instead of disabled, and a contract test fails any run whose budget does not cover warmup + burst. `test/delivery/load-runner.test.js` (+5) spawns the runner for a 6-way burst and checks the distribution monotonicity, the sequential refusal, the p95 gate biting at `--p95-budget-ms 0`, and the shipped 50-way default. Not wired into `dde.yml`: a load burst on a shared 2-core runner would report runner contention as product latency ??? it stays an operator command with the honest local measurement above. `npm test` ??? **1292/1292**; boundary audit **1530 files, 0 violations**; docs-node **94 ?? 56 ?? 20** | - **The job-economy cycle leaves the runner too ??? a LIVE playground on the real engine bytes, and the browser found what the tests could not** ??? `docs/PLAYGROUND.html` runs the whole argument in the reader's tab: open a job with a ceiling, lock the escrow at publish, carve sub-agent shares out of the true remainder, meter a model call on the SAME ceiling, race two reserves in one synchronous step, build and sign an x402 challenge only after the cost is reserved, then deliver and watch what ACCEPTED/REJECTED/UNKNOWN do to the money. The engine is not a re-authoring: `scripts/build-playground.mjs` copies the committed `packages/` bytes into `docs/playground/` and makes exactly three mechanical edits (the `node:crypto` import becomes a synchronous pure-JS sha256/hmac shim, package-relative imports flatten, the CLI entry guard is prefixed with `typeof process !== "undefined"`), each one documented in the page footer and in the manifest. `test/delivery/playground-page.test.js` (+16) proves the claim instead of asserting it: the engine copies and the real modules are driven through the SAME scripted run for all three verdicts and compared state-by-state, code-by-code and snapshot-by-snapshot; the x402 gate loop must produce the same HMAC bytes on the shim (refuse-before-sign, `CHALLENGE_ALREADY_RESERVED`, DRY-RUN releases, `settledCents` 0); the shim must match `node:crypto` on the FIPS vectors and edge lengths; `build-playground --check` must find the tree in sync; and the negative battery has 4 page mutations plus an engine-byte tamper that all apply AND bite by name. Run LIVE in a real browser before push, it immediately exposed three defects the green suite could not see: the engine modules threw `ReferenceError: process is not defined` at import (the CLI tail), a scope row rendered `undefined?? held` (a table cell reading a job-level field), and an honest UNKNOWN wore the failure ?? glyph. All three are fixed, and the page now shows `held 500??` after an UNKNOWN delivery in the browser. The public discussion's own boundary is restated in the footer: per-call payments solve the plumbing, "was the work good" stays a judgment question, and UNKNOWN keeps the money HELD ??? locked, recorded, neither paid nor refunded. `npm test` ??? **1287/1287**; boundary audit **1530 files, 0 violations**; docs-node **94 ?? 56 ?? 20** | - **The perf page leaves the runner too ??? a LIVE surface, not a static claim** ??? `docs/DDE-PERF.html` renders what CI actually measured: the latest successful `dde.yml` run and its `dde-runner-reports` artifact from the public API (no token, no clone), the medians/budgets/gates from the committed `benchmarks/perf-history.jsonl` via raw.githubusercontent, and the budgets themselves DERIVED at render time from the trend module's badge table (raw fetch + parse ??? no retyped budget number on the page; retyped numbers rot, the page renders the module's truth). Three feed chips that go red BY NAME when a feed dies (the page never shows silence, nor an old number wearing a live name), bilingual AR/EN with the repo's switcher pattern, sparklines with the budget drawn as a dashed line, committed `docs/badges/perf-*.svg`, and the artifacts table with the 30-day expiry column. `test/delivery/dde-perf-page.test.js` (+6) executes the page's own JS headlessly in a VM (parseBudgets/latestBySeries/sparkline against the real module bytes and recorded history lines) instead of restating it ([C25]), binds the artifact name to dde.yml's actual uploader, pins the index.html card, and carries 4 page-mutation + 1 module-bump applied-and-bites controls. One honesty defect caught in preview before push: the page handed PARSED objects to a lines-expecting function (`372 entries ?? 0 series` while trend cards rendered) ??? the same function worked in the contract because the contract passed the right shape, which is the [C27] two-channel trap in miniature; fixed in the page, the contract now pins the real flow. Found live in the browser (run #188, 737-byte artifact, 3 sparklines) before CI ever saw it. `npm test` ??? **1271/1271** (+19 job-economy flow battery, +1 committed-bind) ; boundary audit **1530 files, 0 violations**; docs-node **94 ?? 56 ?? 20** | -| **v0.5.35 (2026-10-23, this session)** | **The concurrency tail joins the sequential median on the live perf page ??? same code, two depths, and the gap named queueing, not regression** ??? v0.5.34 shipped the load runner, but its p95 had no reader: the perf page showed only the sequential medians, so a reader opening the live surface would never see the number an integrating platform actually experiences under a batch, and the delta between the two numbers carried no framing ??? the two most plausible readings are "engine regressed" (wrong) and "nothing changed" (also wrong). **(1) One metric per series, declared at the source.** `benchmark-trend.mjs` now names each series' tracked metric explicitly in its badge table (the always-on three stay `median`; the load row declares `metric: "p95"` + `budget: 600` + `nightly: true`) and every consumer reads that one declaration: the drift gate now gates the tracked metric (the 2?? bar bites on the p95 tail, not on the sequential median, which is exactly the failure mode that matters under concurrency), badges render the tracked value, and the appended history row carries `metric: "p95"` **only when non-default** ??? an explicit metric on a median series is redundant, a p95 series must say so in its own row. The nightly flag also fixes a badge-mode edge the three always-on series never hit: an absent load history is a **notice and exit 0** (the three badges keep regenerating), never a stale-badge refusal against depth that has not recorded its first point yet. **(2) The page derives the pair instead of retyping it**: `parseBudgets()` now captures the declared metric per row, and `pickPair()` picks the concurrent side as "the row the module declares with metric p95" and the sequential sibling as "the largest-budget median-series row" ??? no series name appears on the page twice, so a module change moves the page in the same push ([C25] applied to the pairing, not only the numbers). `budgetCard`/`trendCard` track each series' declared metric; the pair card renders **sequential median ??? p95 under concurrency** with the queueing framing in AR and EN, and an unrecorded load point renders an honest "not yet" note ??? never a zero and never a silent skip, so the nightly depth's absence cannot wear a live name ([C30]/[C27] applied to absence itself). **(3) The contracts bind all three directions**: `dde-perf-page.test.js` grew the budget table to ???4 series, pins **exactly one** p95-tracked series (`dde-http-load-perf` @ 600ms), pins the sequential sibling by the module rule (`dde-http-wire-perf:wire`), executes `pickPair/pairCard` against the recorded history in both states (absent ??? em-dash + "No recorded load point yet"; present ??? the recorded p95 value, never the median) and adds 2 page-mutation negative controls (the queueing framing rewritten to regression by name; the absence note deleted) ??? each applied and each bites; `perf-badges.test.js` +2 (absent load history waits silently + recorded history renders the p95 badge through the 600/750/1300ms color ladder); `load-runner.test.js` +1 **end-to-end linkage**: the runner's own `--json` report is handed to `benchmark-trend.mjs` in a sandbox and the appended row must carry the load series name, `metric: "p95"` and byte-for-byte the run's own p95 ??? the recorded tail cannot be a different number wearing the load label. `npm test` ??? **1296/1296** (+4); boundary audit **1530 files, 0 violations** (file count unchanged: this cycle only deepened committed files); docs-node **94 ?? 56 ?? 20** | -| **v0.5.36 (2026-10-23, this session)** | **The committed ledger tears itself into a curve ??? `docs/DDE-TREND.html` plots the engine/wire/SDK medians and the tracker bot's next point lands on the page without a redeploy** ??? the perf board and the pull-down trend in `DDE-PERF.html` rendered the latest point per series, but the ledger the repo already commits (`benchmarks/perf-history.jsonl`) held the whole history and no live surface drew it: a reader opening the trend page sees the shipped data as numbers per series, not as the shape those numbers move in. **(1) The curves are drawn from the ledger itself**: the page fetches the committed `benchmarks/perf-history.jsonl` over the public raw endpoint (same no-token channel the perf board already uses), parses it line-wise, and plots the engine/wire/SDK median curves; a 60s poll re-fetches both sources (ledger + module) and redraws silently, so the tracker bot's next appended point moves the page with no release in the loop ??? the poll path is the same tokenizer the loader feeds, so a poll failure names its URL on a red strip instead of corrupting the canvas. **(2) The budgets are the module's, never the page's**: `parseBudgets()` derives each series' budget and declared metric from `scripts/benchmark-trend.mjs` bytes, so a module bump shifts the dashed budget line in the same push, and a curve series the module does not declare does not get a budget from memory ??? the honest absence renders instead ([C27]/[C25] applied to the curve panel, not only to the pair card). **(3) The contract binds the page to its bytes, not to look-alikes**: `test/delivery/dde-trend-page.test.js` (+8) executes `parseBudgets`, `latestBySeries`, `medianSeries`, `curveBySeries` and `curvePanel` inside a VM against the REAL page bytes and the REAL ledger bytes; docs-node validates the fetcher/polled contract through the same tokenizer; and the battery's five mutations (an invented fetch source, an absent index card, a dark-ledger source without a claim, an unregistered redraw and a deleted poll channel) plus one module-side mutation ??? each applies AND bites, and `docs/index.html` carries a new card walking users to `DDE-TREND.html` with a back-link from its board column. `npm test` ??? **1304/1304** (+8); boundary audit **1530 files, 0 violations**; docs-node **94 ?? 56 ?? 20** | -| **v0.5.37 (2026-10-24, this session)** | **The perf trend gate names its first breach on the failing run's Summary page ??? series, baseline, ratio, beside the red gate** ??? the trend gate could go red with only a scrolling log line; a reviewer opening the run saw a red ??? with the offender buried. `scripts/benchmark-trend.mjs` now captures every drift breach as a structured '{ series, metric, current, baseline, ratio }' row and surfaces the FIRST one three ways: an `alert` object in the `--json` status, a stderr block in every mode, and a Markdown breach row appended to `` (CI) so the run's Summary tab renders the table `series | metric | current | baseline (5-run median) | ratio` beside the red gate ??? while everything the gate already promised holds: a breached run records NOTHING, the summary channel is append-only and best-effort (a failed append never flips the gate), and a report whose OWN gate is FAIL is a recording error, never a drift alert. `test/ci/perf-drift-alert.test.js` (+5) binds the structured alert's fields exactly (2.5ms against a 0.6ms five-run baseline = 4.17x), the rendered summary row, green-run silence, the FAIL-gate distinction and the append-only property. `npm test` ??? **1309/1309** (+5); boundary audit **1530 files, 0 violations**; docs-node **95 ?? 56 ?? 20** | -| **v0.5.38 (2026-10-24, this session)** | **One badge answers 'are we inside the budgets?' ??? the aggregate perf??all sums the set by its worst case** ??? the README carried three series badges plus a raw link into the ledger; a reader wanting one glance had to read three numbers against three budgets, and nothing said the load series when its nightly point lands. `benchmark-trend.mjs --badges` now renders a fourth badge, `docs/badges/perf-all.svg` (`perf??all`), from ONLY the badges the run actually rendered ??? the always-on three tonight, the severity ladder by name: every series inside its budget ??? **green `all within budget`**; any series past its budget but inside the 2x regression bar ??? **yellow `N above budget`**; any series beyond the bar ??? **red `regression detected`** ??? and the nightly load tail joins automatically the moment it records its first point, so the aggregate can never show a state the set does not, with the same all-or-nothing atomicity (any series unresolvable ??? nothing written at all). README embeds it beside the three (`DDE perf ?? all`, same ledger anchor), and the badge contract grew teeth: `perf-badges.test.js` (+3) pins the green/yellow/red ladder through the exact engine budgets (50/75/120ms), pins the README-set equality at FOUR files, and the generation summary must list the aggregate it wrote. `npm test` ??? **1312/1312** (+3); boundary audit **1530 files, 0 violations** (+^`perf-all.svg`); docs-node **95 ?? 56 ?? 20** | -| **v0.5.44 (2026-10-27, this session)** | **CI ???????? ?????? ?????????? ???????? + ?????? workflow ?????????? ???????????????? ?????????????????????? ??????????????** ??? the previous cycle pushed a commit (468f95b dated 2026-10-26, then c6a9efb) whose state-snapshot and claims-registry were STALE ??? they still measured the pre-`scaffold.yml` tree (898 files / 99 docs-node commands) ??? so CI's truth chain stayed green locally but went red on GitHub (current-state --check DRIFT + status-truth + docs-node). This cycle fixes it at the root: the snapshot and every citing surface are regenerated ON THE FINAL TREE, not back-filled. | **Both shipped templates are now exercised end-to-end on EVERY push ??? generated in a clean environment and run by their OWN internal tests, via `.github/workflows/scaffold.yml` ("Scaffold Runs")** ??? the generator's two templates were only proven by in-repo unit tests and the docs-node contract (which executes the documented command lines, not the scaffolds' own suites in the reader's world), so nothing in CI ever asked: does a freshly generated project, outside this repository's tree, actually install and pass its own tests as shipped? The workflow answers it on every push and PR: the DEFAULT scaffold is generated into a fresh `$RUNNER_TEMP` dir, its smoke suite (`node --test`, which imports the PUBLIC `@coreguard/sdk`) is run after installing the SDK's REAL dependency closure from packed tarballs ??? the publish gate's install-parity technique, npm linking command-line tarballs by name+version (13 packages), never workspace symlinks and never a registry publish assumption ??? and the DDE scaffold is generated into a second fresh dir where `node verify-dde.mjs` must exit 0 (VERIFIED, 9 PASS + 1 E5 NOT_RUN as designed), `node payout-gate.mjs` must exit **2** (the documented HOLD ??? a RELEASE on the shipped fixture fails the run BY NAME: the scaffold no longer teaches the boundary), and the scaffold's own 5 contract tests must pass. Both paths were dry-run locally to the same commands before shipping; the new file joins the guard class (lockfile check before setup-node, YAML zero-jobs guard ??? `check-workflows.mjs` now reports 6 workflow files) and survives the YAML parse contract 10/10. Suite **1333/1333** (unchanged ??? no new test file); boundary audit **1530 files, 0 violations** (the workflow file); docs-node **99 ?? 56 ?? 20** | -| **v0.5.42 (2026-10-26, this session)** | **`--fixture-real`: the DDE scaffold can now be born from a REAL case, not only from the synthetic template** ??? `create:integration`'s `--dde` arm shipped a static, honestly-labeled synthetic fixture, so an operator who already passed the intake gate still had to hand-assemble the scaffold's fixture directory. The new flag pairs with `--dde` (`create-integration.mjs --dde --fixture-real `) and delegates the candidate ??? fixture conversion to the intake pipeline's OWN entry point (`examples/real-fixture-intake/convert-to-fixture.mjs`) ??? the identical bytes any operator or reviewer replays, never a re-typed copy ([C25]/[C27]): the prelude gate must come back GATE GREEN (exit 0) or the generator **removes the half-built scaffold and exits 1** (fail-closed: a GATE RED candidate scaffolds nothing, and no synthetic bytes ever ride along ??? the static `dde-fixture/` is excluded from the copy), converted records are the candidate's own (JSON-identical per record), origin `REAL`, pins re-hashed against the written bytes, and the REAL SDK engine must already have judged the conversion `VERIFIED` (the converter refuses anything else). Contract-tested at three levels: `test/p1/create-integration.test.js` (+3, 8 total ??? the real-merge scaffold verifies `VERIFIED` through the in-repo engine with the candidate's own records, the missing-`--dde` usage error, and a red candidate leaving no scaffold), the docs-node contract gained its own `--fixture-real` arm executing the documented scaffold over the SAME staged candidate the intake fences use (origin pinned `REAL`), and the contract's `&&`-chain splitter now honors the SAME per-line `expectFor` contracts as the single-command path ??? `payout-gate.mjs`'s documented exit 2 (the HOLD) is contract inside chains too. `npm test` ??? **1333/1333** (+3); boundary audit **1530 files, 0 violations**; docs-node **99 ?? 56 ?? 20** | -| **v0.5.41 (2026-10-25, this session)** | **Every badge now names the commit it was measured at, and the quick-start templates graduate from prose to a live page** ??? the ledger said which medians the bot recorded but never said whose code produced them, and a reader of the README saw three badge numbers with no way back to the run behind them. **(1) Commit binding:** `benchmark-trend.mjs` now records `sha` (40-hex, from `git rev-parse HEAD` of the measured checkout) on every appended trend point, and `--badges` stamps each series badge with `data-sha="???"` of its latest point ??? the aggregate `perf??all` wears none by design (its set may span commits), and nothing is ever fabricated: no reachable git means no sha and no binding, ever ([C30]). The shared audit core grew teeth in both surfaces (working tree + main commit tree): wrong binding ??? STALE COMMIT BINDING by name, missing ??? same, fabricated (a sha the ledger never carried) ??? refused, aggregate with a single sha ??? refused. `test/ci/perf-commit-binding.test.js` (+4) proves each by control. **(2) QUICKSTART page:** `docs/QUICKSTART.html` documents `create:integration` and `--dde` with nothing hand-copied ??? commands derived from the generator's usage header and `package.json`, template trees from the GitHub API, the ten-record fixture re-verified LIVE in the tab through the committed engine with the acceptance predicate parsed from `payout-gate.mjs`; `test/delivery/quickstart-page.test.js` (+6) executes the page's derivations in a VM on real committed bytes and drives the REAL engine subprocess, and 4 mutations each apply AND bite. The index card joins the other cards. **(3) Scaffold honesty:** `verify-dde.mjs`/`payout-gate.mjs` resolved fixtures via `pathname`, which percent-encodes a path like `CORE DAO` into `%20` and breaks the DDE examples' first run on Windows ??? now `fileURLToPath`; the scaffold must run as-is anywhere. `npm test` ??? **1330/1330** (+10); boundary audit **1530 files, 0 violations**; docs-node **95 ?? 56 ?? 20** | -| **v0.5.40 (2026-10-24, this session)** | **The badge sync is audited at the tip main SERVES, not only at the checkout's working tree** ??? v0.5.39's freshness audit read the working tree; a `git cat-file` view of main tells the truth a checkout can hide: the same sync could break on main (Pages/README serve the COMMITTED bytes) while an uncommitted local regen keeps the working tree green. `test/ci/main-badge-sync.test.js` (+4) reads the GIT COMMIT TREE of main ??? ledger, module badge table and every `docs/badges/*.svg` via `git cat-file -p :path` and `git ls-tree`, resolved HEAD on main checkouts else `refs/remotes/origin/main`, and FAILS NAMED when neither is reachable (an audit that reported green while auditing nothing would be the exact lie it exists to refuse). The audit core moved to `test/ci/badge-audit.mjs` so both surfaces (working tree + commit tree) consume ONE derivation of the same rules ??? no duplicated budget regex, per [C25]/[C27]. Three contracts bind it: main's badge set shows main's ledger-latest points (a stale one fails immediately by name), main's badge table parses from the SAME tree it serves (a rewritten table is caught), and a staged newer ledger point bites `STALE` by name ??? proving the audit reads committed bytes, not checkout files. `npm test` ??? **1320/1320** (+4); boundary audit **1530 files, 0 violations**; docs-node **95 ?? 56 ?? 20** | -| **v0.5.39 (2026-10-24, this session)** | **A stale badge can no longer hide ??? badge freshness is now audited at commit granularity, caught on the local push before GitHub ever sees it** ??? the trend bot regenerates the badges and appends the medians in the SAME commit, but nothing enforced that pairing: a cycle that moved the ledger without regenerating a badge (or the mirror) would leave the README advertising last cycle's number with today's credibility, and `perf-badges.test.js` could not see it because it tests the generator in sandboxes ??? staleness is only visible in the COMMITTED bytes. `test/ci/badge-freshness.test.js` (+4) closes it by re-deriving exactly what `--badges` rendered, from the same sources and NO retyped budget: every BADGE_SERIES row is parsed from the module (the same regex the live pages use, per [C25]/[C27]), the committed `docs/badges/*.svg` for each series must show the ledger's LATEST recorded point AND the ladder-verdict color, `perf-all` must be the worst case of exactly the rendered set (nightly absence honored ??? no badge before its first point), and any committed `perf-*` file the module does not declare is an unregenerable artifact that fails by name (the CG-BDG/1 `specimen-*` SVG family is explicitly carved out ??? a different system, owned and regenerated by CG-BDG/1). Three mutation controls each apply AND bite by name: a stale engine value (ledger 0.0999ms vs badge 0.105ms ??? 'STALE (re-run --badges)' named file+series+values), a lying color (green number the ladder calls yellow), and a phantom badge (committed `perf-phantom.svg` no module row declares). This audit wired into `test/ci` means every pre-push and CI run catches badge???ledger divergence before the run is green. `npm test` ??? **1316/1316** (+4); boundary audit **1530 files, 0 violations**; docs-node **95 ?? 56 ?? 20** | -| **v0.5.31 (2026-09-30, this session)** | **The runners' own reports leave the runner** ??? dde.yml now uploads the SDK + wire perf reports (the `--json` medians) as ONE `dde-runner-reports` artifact per run: `retention-days: 30` PINNED (an unpinned retention silently defaults and drifts), `if-no-files-found: error` (evidence is fail-closed, not best-effort), placed after both benchmarks and BEFORE the trend gate so the evidence lands even when the gate defers or goes red. The workflow-yaml contract grew the artifact clause ??? exactly one uploader, both report paths, the pinned retention, a major-pinned action, and the ordering ??? with 6 negative controls each applied-and-bites (retention drift ?? pin removal ?? emptiness made silent ?? wire report dropped ?? benchmark step renamed ?? uploader unpinned); the battery is CRLF-normalized per [C3] after the first draft silently applied only 3 of 6 on this Windows checkout. `npm test` ??? **1245/1245** (+2); boundary audit **1530 files, 0 violations**; docs-node **94 ?? 56 ?? 20** | -| **v0.5.30 (2026-09-30, this session)** | **The proxy posture now speaks all three front doors** ??? the boundary doc's production section gained Caddy and Traefik equivalents beside nginx (the section that already carried a structural CI contract): Caddy with its honest build choice spelled out (no standard rate-limit module ??? claim it and the section names the degenerate shared-budget failure; module build or Traefik are the honest per-client paths), `reverse_proxy` to the documented loopback bind, `request_body max_size` at the 1 MiB cap, ACME/internal/pinned TLS; Traefik with the full translation (`rateLimit` average 10 / burst 20 mirroring the nginx fence, `buffering.maxRequestBodyBytes` = 1048576, entry-point TLS, forwarded headers logging-only) ??? both with their own "Never do" list. Zero fences executed, zero new start lines, zero nginx fences added: the nginx-conf, doc-curl, and docs-node contracts stay byte-stable, and the doc-freshness contract holds the new sections to the same live-code anchors (loopback socket, the 1 MiB cap, no fresh DNS claims). `npm test` ??? **1243/1243** (unchanged: docs-only cycle); boundary audit **1530 files, 0 violations**; docs-node **94 ?? 56 ?? 20** | +| **v0.5.34 (2026-10-22, this session)** | **A load number that cannot be faked by a sequential loop** ??? `scripts/benchmark-dde-load.mjs` (`npm run benchmark:dde-load`) keeps **50 requests outstanding** against `POST /verify` until 200 have completed and reports the latency distribution of that burst, because the sequential wire benchmark measures the friendly case (one request, no sharing of the event loop, the socket pool or the JSON parser). The gate fails closed on four measured facts, not on prose: every response must be `200 VERIFIED` with the decision intact (perf is measured on the real gate), the observed peak in flight must equal the requested depth, **?? latency / wall time must be ??? 2** ??? a `for ??? await` rewrite reports overlap ??? 1 no matter how fast the server is, so a sequential loop cannot wear the concurrent label ??? and p95 must stay under its budget. `--concurrency 1` is refused by name rather than accepted as a load run. Measured on the dev box: **200/200 VERIFIED ?? peak 50/50 ?? overlap 48x ?? 729.8 req/s ?? median 64.1 ms ?? p95 93.0 ms** (p99 97.8 ?? max 98.8) in 274 ms wall time, against the sequential runner's p95 of ~2.4???3.2 ms: the delta is queueing on one shared event loop, which is the number an integrating platform actually experiences under a batch, and the report says so. The first live run failed honestly ??? 50 ?? 429 ??? because the warmup burst shares the fixed window with the measured burst and the granted limiter ceiling had not included it; the limiter is a REAL guard, so it is sized for the run and disclosed in the report (`250 req / 60s`) instead of disabled, and a contract test fails any run whose budget does not cover warmup + burst. `test/delivery/load-runner.test.js` (+5) spawns the runner for a 6-way burst and checks the distribution monotonicity, the sequential refusal, the p95 gate biting at `--p95-budget-ms 0`, and the shipped 50-way default. Not wired into `dde.yml`: a load burst on a shared 2-core runner would report runner contention as product latency ??? it stays an operator command with the honest local measurement above. `npm test` ??? **1292/1292**; boundary audit **1531 files, 0 violations**; docs-node **94 ?? 56 ?? 20** | + **The job-economy cycle leaves the runner too ??? a LIVE playground on the real engine bytes, and the browser found what the tests could not** ??? `docs/PLAYGROUND.html` runs the whole argument in the reader's tab: open a job with a ceiling, lock the escrow at publish, carve sub-agent shares out of the true remainder, meter a model call on the SAME ceiling, race two reserves in one synchronous step, build and sign an x402 challenge only after the cost is reserved, then deliver and watch what ACCEPTED/REJECTED/UNKNOWN do to the money. The engine is not a re-authoring: `scripts/build-playground.mjs` copies the committed `packages/` bytes into `docs/playground/` and makes exactly three mechanical edits (the `node:crypto` import becomes a synchronous pure-JS sha256/hmac shim, package-relative imports flatten, the CLI entry guard is prefixed with `typeof process !== "undefined"`), each one documented in the page footer and in the manifest. `test/delivery/playground-page.test.js` (+16) proves the claim instead of asserting it: the engine copies and the real modules are driven through the SAME scripted run for all three verdicts and compared state-by-state, code-by-code and snapshot-by-snapshot; the x402 gate loop must produce the same HMAC bytes on the shim (refuse-before-sign, `CHALLENGE_ALREADY_RESERVED`, DRY-RUN releases, `settledCents` 0); the shim must match `node:crypto` on the FIPS vectors and edge lengths; `build-playground --check` must find the tree in sync; and the negative battery has 4 page mutations plus an engine-byte tamper that all apply AND bite by name. Run LIVE in a real browser before push, it immediately exposed three defects the green suite could not see: the engine modules threw `ReferenceError: process is not defined` at import (the CLI tail), a scope row rendered `undefined?? held` (a table cell reading a job-level field), and an honest UNKNOWN wore the failure ?? glyph. All three are fixed, and the page now shows `held 500??` after an UNKNOWN delivery in the browser. The public discussion's own boundary is restated in the footer: per-call payments solve the plumbing, "was the work good" stays a judgment question, and UNKNOWN keeps the money HELD ??? locked, recorded, neither paid nor refunded. `npm test` ??? **1287/1287**; boundary audit **1531 files, 0 violations**; docs-node **94 ?? 56 ?? 20** | + **The perf page leaves the runner too ??? a LIVE surface, not a static claim** ??? `docs/DDE-PERF.html` renders what CI actually measured: the latest successful `dde.yml` run and its `dde-runner-reports` artifact from the public API (no token, no clone), the medians/budgets/gates from the committed `benchmarks/perf-history.jsonl` via raw.githubusercontent, and the budgets themselves DERIVED at render time from the trend module's badge table (raw fetch + parse ??? no retyped budget number on the page; retyped numbers rot, the page renders the module's truth). Three feed chips that go red BY NAME when a feed dies (the page never shows silence, nor an old number wearing a live name), bilingual AR/EN with the repo's switcher pattern, sparklines with the budget drawn as a dashed line, committed `docs/badges/perf-*.svg`, and the artifacts table with the 30-day expiry column. `test/delivery/dde-perf-page.test.js` (+6) executes the page's own JS headlessly in a VM (parseBudgets/latestBySeries/sparkline against the real module bytes and recorded history lines) instead of restating it ([C25]), binds the artifact name to dde.yml's actual uploader, pins the index.html card, and carries 4 page-mutation + 1 module-bump applied-and-bites controls. One honesty defect caught in preview before push: the page handed PARSED objects to a lines-expecting function (`372 entries ?? 0 series` while trend cards rendered) ??? the same function worked in the contract because the contract passed the right shape, which is the [C27] two-channel trap in miniature; fixed in the page, the contract now pins the real flow. Found live in the browser (run #188, 737-byte artifact, 3 sparklines) before CI ever saw it. `npm test` ??? **1271/1271** (+19 job-economy flow battery, +1 committed-bind) ; boundary audit **1531 files, 0 violations**; docs-node **94 ?? 56 ?? 20** | +| **v0.5.35 (2026-10-23, this session)** | **The concurrency tail joins the sequential median on the live perf page ??? same code, two depths, and the gap named queueing, not regression** ??? v0.5.34 shipped the load runner, but its p95 had no reader: the perf page showed only the sequential medians, so a reader opening the live surface would never see the number an integrating platform actually experiences under a batch, and the delta between the two numbers carried no framing ??? the two most plausible readings are "engine regressed" (wrong) and "nothing changed" (also wrong). **(1) One metric per series, declared at the source.** `benchmark-trend.mjs` now names each series' tracked metric explicitly in its badge table (the always-on three stay `median`; the load row declares `metric: "p95"` + `budget: 600` + `nightly: true`) and every consumer reads that one declaration: the drift gate now gates the tracked metric (the 2?? bar bites on the p95 tail, not on the sequential median, which is exactly the failure mode that matters under concurrency), badges render the tracked value, and the appended history row carries `metric: "p95"` **only when non-default** ??? an explicit metric on a median series is redundant, a p95 series must say so in its own row. The nightly flag also fixes a badge-mode edge the three always-on series never hit: an absent load history is a **notice and exit 0** (the three badges keep regenerating), never a stale-badge refusal against depth that has not recorded its first point yet. **(2) The page derives the pair instead of retyping it**: `parseBudgets()` now captures the declared metric per row, and `pickPair()` picks the concurrent side as "the row the module declares with metric p95" and the sequential sibling as "the largest-budget median-series row" ??? no series name appears on the page twice, so a module change moves the page in the same push ([C25] applied to the pairing, not only the numbers). `budgetCard`/`trendCard` track each series' declared metric; the pair card renders **sequential median ??? p95 under concurrency** with the queueing framing in AR and EN, and an unrecorded load point renders an honest "not yet" note ??? never a zero and never a silent skip, so the nightly depth's absence cannot wear a live name ([C30]/[C27] applied to absence itself). **(3) The contracts bind all three directions**: `dde-perf-page.test.js` grew the budget table to ???4 series, pins **exactly one** p95-tracked series (`dde-http-load-perf` @ 600ms), pins the sequential sibling by the module rule (`dde-http-wire-perf:wire`), executes `pickPair/pairCard` against the recorded history in both states (absent ??? em-dash + "No recorded load point yet"; present ??? the recorded p95 value, never the median) and adds 2 page-mutation negative controls (the queueing framing rewritten to regression by name; the absence note deleted) ??? each applied and each bites; `perf-badges.test.js` +2 (absent load history waits silently + recorded history renders the p95 badge through the 600/750/1300ms color ladder); `load-runner.test.js` +1 **end-to-end linkage**: the runner's own `--json` report is handed to `benchmark-trend.mjs` in a sandbox and the appended row must carry the load series name, `metric: "p95"` and byte-for-byte the run's own p95 ??? the recorded tail cannot be a different number wearing the load label. `npm test` ??? **1296/1296** (+4); boundary audit **1531 files, 0 violations** (file count unchanged: this cycle only deepened committed files); docs-node **94 ?? 56 ?? 20** | +| **v0.5.36 (2026-10-23, this session)** | **The committed ledger tears itself into a curve ??? `docs/DDE-TREND.html` plots the engine/wire/SDK medians and the tracker bot's next point lands on the page without a redeploy** ??? the perf board and the pull-down trend in `DDE-PERF.html` rendered the latest point per series, but the ledger the repo already commits (`benchmarks/perf-history.jsonl`) held the whole history and no live surface drew it: a reader opening the trend page sees the shipped data as numbers per series, not as the shape those numbers move in. **(1) The curves are drawn from the ledger itself**: the page fetches the committed `benchmarks/perf-history.jsonl` over the public raw endpoint (same no-token channel the perf board already uses), parses it line-wise, and plots the engine/wire/SDK median curves; a 60s poll re-fetches both sources (ledger + module) and redraws silently, so the tracker bot's next appended point moves the page with no release in the loop ??? the poll path is the same tokenizer the loader feeds, so a poll failure names its URL on a red strip instead of corrupting the canvas. **(2) The budgets are the module's, never the page's**: `parseBudgets()` derives each series' budget and declared metric from `scripts/benchmark-trend.mjs` bytes, so a module bump shifts the dashed budget line in the same push, and a curve series the module does not declare does not get a budget from memory ??? the honest absence renders instead ([C27]/[C25] applied to the curve panel, not only to the pair card). **(3) The contract binds the page to its bytes, not to look-alikes**: `test/delivery/dde-trend-page.test.js` (+8) executes `parseBudgets`, `latestBySeries`, `medianSeries`, `curveBySeries` and `curvePanel` inside a VM against the REAL page bytes and the REAL ledger bytes; docs-node validates the fetcher/polled contract through the same tokenizer; and the battery's five mutations (an invented fetch source, an absent index card, a dark-ledger source without a claim, an unregistered redraw and a deleted poll channel) plus one module-side mutation ??? each applies AND bites, and `docs/index.html` carries a new card walking users to `DDE-TREND.html` with a back-link from its board column. `npm test` ??? **1304/1304** (+8); boundary audit **1531 files, 0 violations**; docs-node **94 ?? 56 ?? 20** | +| **v0.5.37 (2026-10-24, this session)** | **The perf trend gate names its first breach on the failing run's Summary page ??? series, baseline, ratio, beside the red gate** ??? the trend gate could go red with only a scrolling log line; a reviewer opening the run saw a red ??? with the offender buried. `scripts/benchmark-trend.mjs` now captures every drift breach as a structured '{ series, metric, current, baseline, ratio }' row and surfaces the FIRST one three ways: an `alert` object in the `--json` status, a stderr block in every mode, and a Markdown breach row appended to `` (CI) so the run's Summary tab renders the table `series | metric | current | baseline (5-run median) | ratio` beside the red gate ??? while everything the gate already promised holds: a breached run records NOTHING, the summary channel is append-only and best-effort (a failed append never flips the gate), and a report whose OWN gate is FAIL is a recording error, never a drift alert. `test/ci/perf-drift-alert.test.js` (+5) binds the structured alert's fields exactly (2.5ms against a 0.6ms five-run baseline = 4.17x), the rendered summary row, green-run silence, the FAIL-gate distinction and the append-only property. `npm test` ??? **1309/1309** (+5); boundary audit **1531 files, 0 violations**; docs-node **95 ?? 56 ?? 20** | +| **v0.5.38 (2026-10-24, this session)** | **One badge answers 'are we inside the budgets?' ??? the aggregate perf??all sums the set by its worst case** ??? the README carried three series badges plus a raw link into the ledger; a reader wanting one glance had to read three numbers against three budgets, and nothing said the load series when its nightly point lands. `benchmark-trend.mjs --badges` now renders a fourth badge, `docs/badges/perf-all.svg` (`perf??all`), from ONLY the badges the run actually rendered ??? the always-on three tonight, the severity ladder by name: every series inside its budget ??? **green `all within budget`**; any series past its budget but inside the 2x regression bar ??? **yellow `N above budget`**; any series beyond the bar ??? **red `regression detected`** ??? and the nightly load tail joins automatically the moment it records its first point, so the aggregate can never show a state the set does not, with the same all-or-nothing atomicity (any series unresolvable ??? nothing written at all). README embeds it beside the three (`DDE perf ?? all`, same ledger anchor), and the badge contract grew teeth: `perf-badges.test.js` (+3) pins the green/yellow/red ladder through the exact engine budgets (50/75/120ms), pins the README-set equality at FOUR files, and the generation summary must list the aggregate it wrote. `npm test` ??? **1312/1312** (+3); boundary audit **1531 files, 0 violations** (+^`perf-all.svg`); docs-node **95 ?? 56 ?? 20** | +| **v0.5.44 (2026-10-27, this session)** | **CI ???????? ?????? ?????????? ???????? + ?????? workflow ?????????? ???????????????? ?????????????????????? ??????????????** ??? the previous cycle pushed a commit (468f95b dated 2026-10-26, then c6a9efb) whose state-snapshot and claims-registry were STALE ??? they still measured the pre-`scaffold.yml` tree (898 files / 99 docs-node commands) ??? so CI's truth chain stayed green locally but went red on GitHub (current-state --check DRIFT + status-truth + docs-node). This cycle fixes it at the root: the snapshot and every citing surface are regenerated ON THE FINAL TREE, not back-filled. | **Both shipped templates are now exercised end-to-end on EVERY push ??? generated in a clean environment and run by their OWN internal tests, via `.github/workflows/scaffold.yml` ("Scaffold Runs")** ??? the generator's two templates were only proven by in-repo unit tests and the docs-node contract (which executes the documented command lines, not the scaffolds' own suites in the reader's world), so nothing in CI ever asked: does a freshly generated project, outside this repository's tree, actually install and pass its own tests as shipped? The workflow answers it on every push and PR: the DEFAULT scaffold is generated into a fresh `$RUNNER_TEMP` dir, its smoke suite (`node --test`, which imports the PUBLIC `@coreguard/sdk`) is run after installing the SDK's REAL dependency closure from packed tarballs ??? the publish gate's install-parity technique, npm linking command-line tarballs by name+version (13 packages), never workspace symlinks and never a registry publish assumption ??? and the DDE scaffold is generated into a second fresh dir where `node verify-dde.mjs` must exit 0 (VERIFIED, 9 PASS + 1 E5 NOT_RUN as designed), `node payout-gate.mjs` must exit **2** (the documented HOLD ??? a RELEASE on the shipped fixture fails the run BY NAME: the scaffold no longer teaches the boundary), and the scaffold's own 5 contract tests must pass. Both paths were dry-run locally to the same commands before shipping; the new file joins the guard class (lockfile check before setup-node, YAML zero-jobs guard ??? `check-workflows.mjs` now reports 6 workflow files) and survives the YAML parse contract 10/10. Suite **1333/1333** (unchanged ??? no new test file); boundary audit **1531 files, 0 violations** (the workflow file); docs-node **99 ?? 56 ?? 20** | +| **v0.5.42 (2026-10-26, this session)** | **`--fixture-real`: the DDE scaffold can now be born from a REAL case, not only from the synthetic template** ??? `create:integration`'s `--dde` arm shipped a static, honestly-labeled synthetic fixture, so an operator who already passed the intake gate still had to hand-assemble the scaffold's fixture directory. The new flag pairs with `--dde` (`create-integration.mjs --dde --fixture-real `) and delegates the candidate ??? fixture conversion to the intake pipeline's OWN entry point (`examples/real-fixture-intake/convert-to-fixture.mjs`) ??? the identical bytes any operator or reviewer replays, never a re-typed copy ([C25]/[C27]): the prelude gate must come back GATE GREEN (exit 0) or the generator **removes the half-built scaffold and exits 1** (fail-closed: a GATE RED candidate scaffolds nothing, and no synthetic bytes ever ride along ??? the static `dde-fixture/` is excluded from the copy), converted records are the candidate's own (JSON-identical per record), origin `REAL`, pins re-hashed against the written bytes, and the REAL SDK engine must already have judged the conversion `VERIFIED` (the converter refuses anything else). Contract-tested at three levels: `test/p1/create-integration.test.js` (+3, 8 total ??? the real-merge scaffold verifies `VERIFIED` through the in-repo engine with the candidate's own records, the missing-`--dde` usage error, and a red candidate leaving no scaffold), the docs-node contract gained its own `--fixture-real` arm executing the documented scaffold over the SAME staged candidate the intake fences use (origin pinned `REAL`), and the contract's `&&`-chain splitter now honors the SAME per-line `expectFor` contracts as the single-command path ??? `payout-gate.mjs`'s documented exit 2 (the HOLD) is contract inside chains too. `npm test` ??? **1333/1333** (+3); boundary audit **1531 files, 0 violations**; docs-node **99 ?? 56 ?? 20** | +| **v0.5.41 (2026-10-25, this session)** | **Every badge now names the commit it was measured at, and the quick-start templates graduate from prose to a live page** ??? the ledger said which medians the bot recorded but never said whose code produced them, and a reader of the README saw three badge numbers with no way back to the run behind them. **(1) Commit binding:** `benchmark-trend.mjs` now records `sha` (40-hex, from `git rev-parse HEAD` of the measured checkout) on every appended trend point, and `--badges` stamps each series badge with `data-sha="???"` of its latest point ??? the aggregate `perf??all` wears none by design (its set may span commits), and nothing is ever fabricated: no reachable git means no sha and no binding, ever ([C30]). The shared audit core grew teeth in both surfaces (working tree + main commit tree): wrong binding ??? STALE COMMIT BINDING by name, missing ??? same, fabricated (a sha the ledger never carried) ??? refused, aggregate with a single sha ??? refused. `test/ci/perf-commit-binding.test.js` (+4) proves each by control. **(2) QUICKSTART page:** `docs/QUICKSTART.html` documents `create:integration` and `--dde` with nothing hand-copied ??? commands derived from the generator's usage header and `package.json`, template trees from the GitHub API, the ten-record fixture re-verified LIVE in the tab through the committed engine with the acceptance predicate parsed from `payout-gate.mjs`; `test/delivery/quickstart-page.test.js` (+6) executes the page's derivations in a VM on real committed bytes and drives the REAL engine subprocess, and 4 mutations each apply AND bite. The index card joins the other cards. **(3) Scaffold honesty:** `verify-dde.mjs`/`payout-gate.mjs` resolved fixtures via `pathname`, which percent-encodes a path like `CORE DAO` into `%20` and breaks the DDE examples' first run on Windows ??? now `fileURLToPath`; the scaffold must run as-is anywhere. `npm test` ??? **1330/1330** (+10); boundary audit **1531 files, 0 violations**; docs-node **95 ?? 56 ?? 20** | +| **v0.5.40 (2026-10-24, this session)** | **The badge sync is audited at the tip main SERVES, not only at the checkout's working tree** ??? v0.5.39's freshness audit read the working tree; a `git cat-file` view of main tells the truth a checkout can hide: the same sync could break on main (Pages/README serve the COMMITTED bytes) while an uncommitted local regen keeps the working tree green. `test/ci/main-badge-sync.test.js` (+4) reads the GIT COMMIT TREE of main ??? ledger, module badge table and every `docs/badges/*.svg` via `git cat-file -p :path` and `git ls-tree`, resolved HEAD on main checkouts else `refs/remotes/origin/main`, and FAILS NAMED when neither is reachable (an audit that reported green while auditing nothing would be the exact lie it exists to refuse). The audit core moved to `test/ci/badge-audit.mjs` so both surfaces (working tree + commit tree) consume ONE derivation of the same rules ??? no duplicated budget regex, per [C25]/[C27]. Three contracts bind it: main's badge set shows main's ledger-latest points (a stale one fails immediately by name), main's badge table parses from the SAME tree it serves (a rewritten table is caught), and a staged newer ledger point bites `STALE` by name ??? proving the audit reads committed bytes, not checkout files. `npm test` ??? **1320/1320** (+4); boundary audit **1531 files, 0 violations**; docs-node **95 ?? 56 ?? 20** | +| **v0.5.39 (2026-10-24, this session)** | **A stale badge can no longer hide ??? badge freshness is now audited at commit granularity, caught on the local push before GitHub ever sees it** ??? the trend bot regenerates the badges and appends the medians in the SAME commit, but nothing enforced that pairing: a cycle that moved the ledger without regenerating a badge (or the mirror) would leave the README advertising last cycle's number with today's credibility, and `perf-badges.test.js` could not see it because it tests the generator in sandboxes ??? staleness is only visible in the COMMITTED bytes. `test/ci/badge-freshness.test.js` (+4) closes it by re-deriving exactly what `--badges` rendered, from the same sources and NO retyped budget: every BADGE_SERIES row is parsed from the module (the same regex the live pages use, per [C25]/[C27]), the committed `docs/badges/*.svg` for each series must show the ledger's LATEST recorded point AND the ladder-verdict color, `perf-all` must be the worst case of exactly the rendered set (nightly absence honored ??? no badge before its first point), and any committed `perf-*` file the module does not declare is an unregenerable artifact that fails by name (the CG-BDG/1 `specimen-*` SVG family is explicitly carved out ??? a different system, owned and regenerated by CG-BDG/1). Three mutation controls each apply AND bite by name: a stale engine value (ledger 0.0999ms vs badge 0.105ms ??? 'STALE (re-run --badges)' named file+series+values), a lying color (green number the ladder calls yellow), and a phantom badge (committed `perf-phantom.svg` no module row declares). This audit wired into `test/ci` means every pre-push and CI run catches badge???ledger divergence before the run is green. `npm test` ??? **1316/1316** (+4); boundary audit **1531 files, 0 violations**; docs-node **95 ?? 56 ?? 20** | +| **v0.5.31 (2026-09-30, this session)** | **The runners' own reports leave the runner** ??? dde.yml now uploads the SDK + wire perf reports (the `--json` medians) as ONE `dde-runner-reports` artifact per run: `retention-days: 30` PINNED (an unpinned retention silently defaults and drifts), `if-no-files-found: error` (evidence is fail-closed, not best-effort), placed after both benchmarks and BEFORE the trend gate so the evidence lands even when the gate defers or goes red. The workflow-yaml contract grew the artifact clause ??? exactly one uploader, both report paths, the pinned retention, a major-pinned action, and the ordering ??? with 6 negative controls each applied-and-bites (retention drift ?? pin removal ?? emptiness made silent ?? wire report dropped ?? benchmark step renamed ?? uploader unpinned); the battery is CRLF-normalized per [C3] after the first draft silently applied only 3 of 6 on this Windows checkout. `npm test` ??? **1245/1245** (+2); boundary audit **1531 files, 0 violations**; docs-node **94 ?? 56 ?? 20** | +| **v0.5.30 (2026-09-30, this session)** | **The proxy posture now speaks all three front doors** ??? the boundary doc's production section gained Caddy and Traefik equivalents beside nginx (the section that already carried a structural CI contract): Caddy with its honest build choice spelled out (no standard rate-limit module ??? claim it and the section names the degenerate shared-budget failure; module build or Traefik are the honest per-client paths), `reverse_proxy` to the documented loopback bind, `request_body max_size` at the 1 MiB cap, ACME/internal/pinned TLS; Traefik with the full translation (`rateLimit` average 10 / burst 20 mirroring the nginx fence, `buffering.maxRequestBodyBytes` = 1048576, entry-point TLS, forwarded headers logging-only) ??? both with their own "Never do" list. Zero fences executed, zero new start lines, zero nginx fences added: the nginx-conf, doc-curl, and docs-node contracts stay byte-stable, and the doc-freshness contract holds the new sections to the same live-code anchors (loopback socket, the 1 MiB cap, no fresh DNS claims). `npm test` ??? **1243/1243** (unchanged: docs-only cycle); boundary audit **1531 files, 0 violations**; docs-node **94 ?? 56 ?? 20** | | **v0.5.29 (2026-09-27, this session)** | **"The twins are identical" would have been the second dead number in a row** ??? v0.5.28 pinned the AR page's 277-key dictionary and left the EN sister's cross-file parity unguarded. The obvious fix is to assert the two files match. Measured first, they do **not**, and the divergence is *designed*: the AR page is the interactive twin (it carries the language switcher), the sister is the printable twin (printhead + print button) ??? which is precisely why the [C5] dictionary walk dropped the EN `printhead` subtree first. So a "they must be equal" test would have been **637 all over again**: a number that reads like a guarantee, matches nothing, and fails the first time a real design decision meets it. `test/p2/gate41-visual-en-parity.test.js` pins the drift that must never happen instead: all **277** dictionary `.en` values appear **verbatim** in the sister (0 absent ??? the cross-file link is real and it holds); the load-bearing element counts are **identical** (section 10 ?? h2 10 ?? h3 12 ?? tr 30 ?? td/th 95 ?? p 19 ?? a 14 ?? ids 34), because a row or heading present in one twin only means the sister is a **stale snapshot** ??? invisible to any per-file test; the only permitted tag differences are `b`/`span`/`div` each **+1** in the sister, pinned **as a set** and re-checked against the `printhead` that causes them, so a new divergence cannot hide beside a sanctioned one; the sister stays **dictionary-free** (0 `data-i18n`, 0 `D.nodes`, 0 `L()`) because it is literal English and a second dictionary would be a second source of truth ([C27]); it leaks **no Arabic** across 539 text runs; and `lang`/`dir` are asserted per twin, since a wrong `dir` silently reverses the whole board's order while every text assertion still passes. Two findings the sweep produced that nobody had asked about: **(a)** **221 of 277** `.ar` values are already literal Arabic in the static markup, so the AR page renders with **JS disabled** ??? the dictionary is the switcher's payload, not the page's only text source, and that count is now pinned so stripping the literal Arabic (a silent availability regression every dictionary-level check would pass) cannot land unnoticed; **(b)** the role asymmetry (AR `langBtn` ??? EN `printBtn`) is pinned **as fact**, so a future session neither "fixes" a deliberate difference nor lets a dead button rot. The 12-control battery reports **coverage rather than a count** ??? all 8 tests had to be *observed failing*, which forced the harness onto `--test-reporter=tap` after the default reporter's glyph output made the extractor silently find zero failures (the ASCII-grep trap, live). Measured: **1201/1201** ?? **836 files ?? 0 violations** ?? docs-node 94/55/20 ?? freeze 49/49. | | **v0.5.30 (2026-11-07, this session)** | **The publish cycle: CG-BDG/1 becomes the repo's first npm-shaped package, the last live 404s are fixed, the honesty mirror lands on every surface ??? and the count discipline caught its own session red before the push.** **(1) The package**: `packages/badge/package.json` (`@coreguard-global/coreguard-badge@1.1.0` ?? `publishConfig.registry` = `npm.pkg.github.com` ?? zero runtime deps ?? import-safe CLI) + a package README written with `text` fences only, so the docs-node contract acquires NO runnable command from an artifact README; `npm install` refreshed the lock (`check-lock-sync`: 23 workspaces). Publication executes on this SHA post-CI; npmjs.com stays double-gated pending `NPM_TOKEN`. **(2) Sixteen live pages ?? 56 unique URLs audited, every non-200 fixed in this commit**: `docs/index.html` LICENSE links (`../LICENSE.md` escaped the Pages root ??? canonical repo-blob URLs), `docs/BRAND.html` 16 identity refs (`../assets/*` ??? canonical `raw.githubusercontent.com/main/assets/*` ??? the brand SVGs live at repo ROOT, unreachable by any relative path from a `docs/`-rooted page), and `docs/DELIVERY-DISPUTE-DEMO.html` pagesLink (`/deployments/pages` ??? an authenticated UI route ??? `actions`, the public runs list) whose label no longer promises a check nothing performs. **(3) The Stellar honesty mirror is pinned verbatim on the org profile README** (live via gh api, `42b6c31`) **and the repo README roadmap section** ??? same five lines, every surface. **(4) The red run that earned its keep**: +2 files moved the boundary 1045???1047 (snapshot regenerated; claims registry re-DERIVED with `--write`, never patched) and the same run exposed a ghost: an untracked `.tmp-release-notes.md` on the dev disk sat inside the docs-node contract's disk walk, adding 5 phantom executed commands + 1 phantom covered doc (a snapshot said 125/26 while the fresh-clone truth stayed 120/75/25); release notes now exist only as `.txt`, closed by construction, and every generated registry that cited the count (claims ?? integration-registry ?? evidence-passport-v2 ?? adoption-dashboard) plus seven hand-cited surfaces were refreshed to **1047** from their sources, never bulk-rewritten. Fresh-clone truth at commit: **1047 files ?? 0 violations ?? docs-node 120/75/25**. | | **v0.5.31 (2026-11-07, this session)** | **The doc number becomes a bonded claim ??? every tests-count a doc states must equal the measured snapshot total, and the Soroban hardening lands as additive lanes** ??? `docs/CLAIMS-TAXONOMY.md` (Arabic-first + EN mirror; no numbers, no fences) defines the honest vocabulary; `test/ci/doc-numbers.test.js` (+7) binds every tests-claim in README/docs + dated-instrument allowlist + [C35] floors (???20 hits, README ???1); the Soroban authorized lane (`commit_authorized` derives the id from owner+hash in-contract, `owner.require_auth()` host-gates a separate `Key::AuthAnchor` namespace, `assert_anchored_authorized` public fail-closed) lands in `soroban/commitment-anchor/src/lib.rs` (8 Rust tests ??? Rust truth = the CI `soroban-rust` job, [C39]) mirrored in `packages/stellar-soroban/index.mjs` (+8: `AUTH_ANCHOR_DOMAIN`, fail-closed `deriveAuthorizedAnchorId`, `ownerScValOrGated` invoke path) with a byte-pinned cross-language known-answer vector; ci.yml repair (workflow-yaml 10/10) and the full doc re-sync (1436 ??? 1451 tests ?? 1050 files, 24 + 1 stale surfaces fixed in the SAME push) keep snapshot, STATUS, and every citing doc on one number | | **v0.5.32 (2026-11-08, this session)** | **Hardening batch closed end-to-end: the Soroban Rust truth went green in CI, and the batch's final reports landed as dated instruments** ??? three commits fixed the CI `soroban-rust` job from inside the committed code (compile: `extend_from_array` arity + no `Bytes::push`; runtime: the Rust test's `executed_hash` bytes 22???31 re-aligned to the JS-true `0xc0dbfb45???1052`, the test strkey swapped to the genuine pinned issuer `GA5ZSEJY???KZVN`, `mock_all_auths()` added to the four authorized-lane write tests) ??? CI run `42413913560` on `ea7e154d???`: ALL 5 jobs green incl. **Soroban contract (Rust tests)**, Pages `built`, post-push `CHECK OK`; `docs/FINAL-REPORT-2026-11-07-ar.md` + its EN mirror `docs/FINAL-REPORT-2026-11-07.md` (Arabic-first + EN mirror, same numbers/hashes fact-for-fact, "as-landed" honesty note each) join the allowlisted dated instruments in the SAME push they land (doc-numbers rule), carrying the batch's 1451 / 1050 / 120??75??25 facts pinned to `ea7e154`; boundary 1050 ??? 1052 files in the same push (+2 = the two reports), snapshot regenerated post-`git add`, and every citing surface re-synced (STATUS row + EXECUTIVE-SUMMARY + EVIDENCE-MATRIX + both grant applications + PITCH-DECK + LINKEDIN-CONTENT + SCF-BUILD + adoption dashboard regenerated live from the snapshot) ??? no stale number shipped | -| **v0.5.33 (2026-11-08, this session)** | **The owner-decision instrument + the fail-closed owner-authorized deploy runner + CI-produced wasm deploy material ??? the hardening batch's authorized lane gets its recorded deploy path** ??? `docs/OWNER-DECISIONS-2026-11-08.md` (Arabic-first + EN mirror, fence-free: an INDENTED machine block so the docs-node contract acquires NO runnable commands; joined the doc-numbers allowlist in the SAME push) records the owner's explicit decision BEFORE any transaction: `authorized_deploy: YES ?? network: mainnet ?? wallet-file: .stellar-wallet.json ?? wasm-material = CI artifact cg-commitment-anchor-wasm (provenance = manifest.headSha ancestor-of-HEAD) ?? wasm-forbidden = the in-tree a80d8f9 artifact ?? mainnet-lane-writes: NONE ?? first-authorized-write = FUTURE SEPARATE OWNER DECISION ?? rehearsal REQUIRED first on testnet ?? fee-floor 1000000 + 1.5x-policy ?? the never list (secrets never printed; deployed/1 untouched; no EVM; no npm publish; no SCF) ??? and the runner reads THIS doc at gate time; `scripts/stellar-soroban-authorized-deploy.mjs` (+16 offline tests, every gate green + applied-and-bite) executes the exact scope: explicit `--wasm-path` only, mainnet double-gated (doc-marker parse + `--owner-authorized` + manifest identity {runId>0, artifactName, wasmSha256 == sha256(bytes), headSha ancestor-of-HEAD via `git merge-base --is-ancestor`} + PASSED rehearsal artifact + fee floor/1.5x policy + read-only balance preflight ??? 2 XLM); testnet `--rehearse` runs the FULL authorized-lane exercise (owner-key `commit_authorized` on the pinned known-answer vector ??? idempotent replay ??? ephemeral wrong-owner probe ??? `assert_anchored_authorized` hash-mismatch probe ??? BOTH probes simulation-only by construction, never submitted); deterministic salt `sha256(deployer : wasmSha256)` makes a re-run land at the SAME address and the already-deployed branch refuses to double-charge (exit 4); artifacts in `docs/evidence/` are digest-stable with `generatedAt` OUTSIDE the digest, and wire reads stay raw per [C37]; `.stellar-wallet.json` is loaded in-process once per run and its material NEVER reaches a console line, an error message, or an artifact (only the PUBLIC key travels ??? enforced by a source-scanner in the battery); `.github/workflows/ci.yml` soroban-rust now also builds `wasm32-unknown-unknown --release --locked` (the standard Soroban deploy target; wasm32v1-none is no-std and cannot carry the dependency tree ??? measured: red run 42493941713, error E0463, fixed same session) and uploads exactly ONE artifact `cg-commitment-anchor-wasm` (retention 30 pinned, `if-no-files-found: error`) so deploy material comes from CI on the recorded HEAD ??? the dev box cannot run cargo ([C39]) and the in-tree artifact predates the authorized lane (a fake authorized-lane deploy is refused by the provenance gate). `npm test` ??? **1467/1467** (+16); boundary audit **1530 files, 0 violations**; docs-node **120 ?? 75 ?? 25** (the decision instrument is fence-free, so the contract acquires no runnable commands) | +| **v0.5.33 (2026-11-08, this session)** | **The owner-decision instrument + the fail-closed owner-authorized deploy runner + CI-produced wasm deploy material ??? the hardening batch's authorized lane gets its recorded deploy path** ??? `docs/OWNER-DECISIONS-2026-11-08.md` (Arabic-first + EN mirror, fence-free: an INDENTED machine block so the docs-node contract acquires NO runnable commands; joined the doc-numbers allowlist in the SAME push) records the owner's explicit decision BEFORE any transaction: `authorized_deploy: YES ?? network: mainnet ?? wallet-file: .stellar-wallet.json ?? wasm-material = CI artifact cg-commitment-anchor-wasm (provenance = manifest.headSha ancestor-of-HEAD) ?? wasm-forbidden = the in-tree a80d8f9 artifact ?? mainnet-lane-writes: NONE ?? first-authorized-write = FUTURE SEPARATE OWNER DECISION ?? rehearsal REQUIRED first on testnet ?? fee-floor 1000000 + 1.5x-policy ?? the never list (secrets never printed; deployed/1 untouched; no EVM; no npm publish; no SCF) ??? and the runner reads THIS doc at gate time; `scripts/stellar-soroban-authorized-deploy.mjs` (+16 offline tests, every gate green + applied-and-bite) executes the exact scope: explicit `--wasm-path` only, mainnet double-gated (doc-marker parse + `--owner-authorized` + manifest identity {runId>0, artifactName, wasmSha256 == sha256(bytes), headSha ancestor-of-HEAD via `git merge-base --is-ancestor`} + PASSED rehearsal artifact + fee floor/1.5x policy + read-only balance preflight ??? 2 XLM); testnet `--rehearse` runs the FULL authorized-lane exercise (owner-key `commit_authorized` on the pinned known-answer vector ??? idempotent replay ??? ephemeral wrong-owner probe ??? `assert_anchored_authorized` hash-mismatch probe ??? BOTH probes simulation-only by construction, never submitted); deterministic salt `sha256(deployer : wasmSha256)` makes a re-run land at the SAME address and the already-deployed branch refuses to double-charge (exit 4); artifacts in `docs/evidence/` are digest-stable with `generatedAt` OUTSIDE the digest, and wire reads stay raw per [C37]; `.stellar-wallet.json` is loaded in-process once per run and its material NEVER reaches a console line, an error message, or an artifact (only the PUBLIC key travels ??? enforced by a source-scanner in the battery); `.github/workflows/ci.yml` soroban-rust now also builds `wasm32-unknown-unknown --release --locked` (the standard Soroban deploy target; wasm32v1-none is no-std and cannot carry the dependency tree ??? measured: red run 42493941713, error E0463, fixed same session) and uploads exactly ONE artifact `cg-commitment-anchor-wasm` (retention 30 pinned, `if-no-files-found: error`) so deploy material comes from CI on the recorded HEAD ??? the dev box cannot run cargo ([C39]) and the in-tree artifact predates the authorized lane (a fake authorized-lane deploy is refused by the provenance gate). `npm test` ??? **1467/1467** (+16); boundary audit **1531 files, 0 violations**; docs-node **120 ?? 75 ?? 25** (the decision instrument is fence-free, so the contract acquires no runnable commands) | | **v0.5.34 (2026-11-10, this session)** | **The Phase-3 mainnet rejection gets its CODED root cause, and the deploy runner now refuses the same failure locally before it ever submits** ??? the committed mainnet artifact's REJECTED `upload(wasm)` `errorResultXdr` (`AAAAAAfMyDb////5AAAAAA==`) decoded through the SDK's OWN schema enum (an earlier hand-ordered table had the arm two positions wrong) reads **`txInsufficientBalance` (-7) at `feeCharged` 130,861,110 stroops** ??? composition provable from the artifact's own numbers (requested inclusion bid 1,000,000 + simulation-priced WASM-upload resource fee 129,861,110), while the funded deployer held 3.5069800 XLM = 35,069,800 stroops: the fee cannot be paid (balance-after-fee would fall below minimum balance), so the network refused BEFORE any effect ??? deterministic, not transient, and NOT the suspected `txBadSeq`/`txBadAuth` (the same canonical enum re-binds the rehearsal's measured blob to `-5/txBadSeq` at feeCharged 40674, fact-checking the runner's own resume-path comment). The remedy is FUNDING, never a lower `--fee`: the EXACT solvent minimum for THIS account is 130,861,110 + 3 ?? 5,000,000 = **145,861,110 stroops = 14.5861110 XLM** (the account carries one USDC trustline from the signed swap cycle, so `subentry_count` 1 raises the ledger minimum to 1.5 XLM; recommended funding 16 XLM for headroom) ??? `scripts/stellar-soroban-authorized-deploy.mjs`: pre-send fee-solvency gate consults BEFORE any `sendTransaction` (zero-submission coded refusal, `rejectFace: PRE_SEND_SOLVENCY`), the per-account minimum is read live from the wire (`subentry_count`; sponsored shapes keep the documented LOWER bound and the ledger keeps the final word), artifacts SELF-DECODE rejections hereafter (canonical name + numeric code + feeCharged ??? the `resultCode: null` hole can never return), solvency evidence travels IN the artifact (`deployerBalanceStroops` / `minBalanceReserveStroops` / `minBalanceReserveFace`), and `finalizeVerdict` no longer stamps the full EXECUTED ??? VERIFIED verdict over REJECTED/FAILED/TIMEOUT steps (the false-verdict class, measured on the committed artifact itself: steps REJECTED/deployed:false sat under a VERIFIED summary line). Battery `test/integrations/stellar-soroban-authorized-deploy.test.mjs` 17 ??? **21**, every test applied-and-bite: the committed-artifact BYTES-bound decode (fresh-clone-reproducible), decode fail-closed probes, the fee-solvency measured + boundary battery (exact `xlmStringToStroops` money parity; beyond-precision fractions refuse) and a source contract pinning consult-before-submit + self-decoding artifacts + the verdict downgrade rule. Full suite **1472/1472**; snapshot/claims/registry regenerated same push; PR #11 stays REVIEW_REQUIRED (no bypass); the owner's next funded re-run is the SAME command once the wallet holds ??? 14.5861110 XLM (16 XLM recommended), Phase 5 follows a landed deploy | | **v0.5.35 (2026-11-10, this session)** | **Phase 5 closed end-to-end: the live mainnet proof verified (LIVE-VERIFIED) + suite 1511/1511** ??? the owner-funded wallet (`GDJ3CRNLNDZ4AVWGPUG7DBC5BIAGMIONOONZGB5FSYAY44ZHOIPRKY7U`) held 16 XLM, Phase 3 executed (`upload`+`create` INVOKED, contract `CAZ3LQEMB37KICXEANKVMRNWMB5MD3O4FBC5GORB7QVUJE2WCPAHQPZB`, wasm sha256 `65da850c???8257`, honest `NOT_CONFIRMED` on the deploy-only readback) and Phase 5 proved it LIVE (`MAINNET AUTHORIZED-LANE DEPLOY LIVE-VERIFIED (create proven from its own result meta; fresh-vault readback SIMULATED_NONE; balance arithmetic exact to the stroop)`; first-attempt artifact archived REJECTED with the coded `txInsufficientBalance (-7)` root cause; battery 25/25; full suite `npm test` ??? **1511/1511 pass** (snapshot re-pinned `testsTotal` 1511, `filesScanned` 1092, docs-node 122??79??27); PR #11 stays REVIEW_REQUIRED (no bypass) | | **v0.5.45 (2026-11-12, this session)** | **PSAR/1: the pre-sign authorization receipt ships end-to-end, honestly labeled** - an authorization decision can now be issued as a receipt bound to the EXACT transaction XDR bytes BEFORE any signature exists, and a wallet re-derives the whole decision itself (canonical sorted-key JSON + sha256 over the exact XDR string + Ed25519 against a pinned issuer key), fail-closed to PASS or BLOCK only with 10 frozen reject codes (a verifier error is itself a BLOCK, never a pass) and `executionProof: NOT_INCLUDED` on every verdict - a pre-sign receipt never reads as proof that anything executed. Landed: `packages/stellar/presign.mjs` (`coreguard.psar/1`) + `test/integrations/stellar-presign.test.mjs` (+27: known-answer vectors, fail-closed set, canonical binding, malformed shapes, deterministic re-issue) + `examples/stellar-presign/demo.mjs` (`npm run stellar:presign` - offline arc: real unsigned envelope ??? PASS, tampered amount ??? BLOCK XDR_BINDING_MISMATCH, lapsed window ??? BLOCK RECEIPT_EXPIRED, self-asserting, exit 0) + the proposal `docs/freighter-presign-integration-proposal-2026-11-12.md` (a scoped 5-point technical evaluation for wallets, answering stellar/freighter #3087's concrete-value question; holds the ONE bash fence for that command; no third Freighter comment was posted - the advisory was build the proof first, and the proof is this push) + surface `stellar-presign-receipt` in `docs/surface-status.json` (BUILT / TEST_EXECUTED / NOT_BUILT) + claim `CL-STELLAR-PRESIGN-RECEIPT` (VERIFIED, L1) + `test/ci/doc-numbers.test.js` extended to index.html (a stale suite count had lived on the landing page since launch) + the full suite-count sweep across every citing surface (1526 ??? 1566); snapshot / claims registry / passports / dashboard regenerated in the SAME push; no signing, no wallet, no network; integration stays NOT_BUILT until a wallet ships it; +13 adopted in the same reconciliation push from the parallel signed-envelope session (field-tamper + replay-determinism batteries) | diff --git a/docs/STELLAR-KILLER-FEATURES.md b/docs/STELLAR-KILLER-FEATURES.md index f13f7c9..fb33bc2 100644 --- a/docs/STELLAR-KILLER-FEATURES.md +++ b/docs/STELLAR-KILLER-FEATURES.md @@ -45,4 +45,4 @@ Targets: Freighter, Albedo, xBull, Lobstr, Rabet, Soroswap, Phoenix, Aquarius, B - Live testnet demo: npm run stellar:demo (real tx verified + replayed) - Packages: packages/stellar/, packages/stellar-agent/, packages/stellar-killer/, packages/agent-gate/ - Tests: all passing, CI green -- Measured: 2009 tests, 1522 files / 0 violations, 0 red checks (state-snapshot) +- Measured: 2013 tests, 1522 files / 0 violations, 0 red checks (state-snapshot) diff --git a/docs/TRINITY-CORE-STELLAR-PI.md b/docs/TRINITY-CORE-STELLAR-PI.md index 0ee75db..f9b9630 100644 --- a/docs/TRINITY-CORE-STELLAR-PI.md +++ b/docs/TRINITY-CORE-STELLAR-PI.md @@ -30,7 +30,7 @@ if(g.allowed){ /* VERIFIED only - never auto-pay */ } - **Real problem**: AI agents need to prove conformance before spending - **Unique**: Deterministic replay-before-submit with fail-closed (UNKNOWN->HELD) - **Ecosystem-wide**: ONE engine for ALL three networks -- **Working proof**: Live Stellar testnet demo + 2009 tests passing +- **Working proof**: Live Stellar testnet demo + 2013 tests passing - **Measurable**: All claims from committed tree, zero fabrication - **AI-agent native**: Built for the agent economy - **Undeniable**: Anyone can replay and verify diff --git a/docs/TWITTER-CONTENT.md b/docs/TWITTER-CONTENT.md index 1a28563..8245998 100644 --- a/docs/TWITTER-CONTENT.md +++ b/docs/TWITTER-CONTENT.md @@ -1,7 +1,7 @@ # CoreGuard Global — Twitter/X Content ## Account: @CoreGuardGlobal -## Bio: "Verifiable Execution Truth Layer for Bitcoin DeFi. 2009 tests. 0 false accepts. Core DAO + Stellar + Pi Network." +## Bio: "Verifiable Execution Truth Layer for Bitcoin DeFi. 2013 tests. 0 false accepts. Core DAO + Stellar + Pi Network." --- @@ -11,7 +11,7 @@ We don't tell you if a transaction looks safe. We produce independently verifiable evidence of whether execution conformed to what was authorized. -2009 tests. 0 false accepts. 0 false rejects. +2013 tests. 0 false accepts. 0 false rejects. https://github.com/coreguard-global/CoreGuard #CoreDAO #DeFi #Security @@ -99,8 +99,8 @@ https://github.com/coreguard-global/CoreGuard ## Tweet 7: Open Source CoreGuard is open source. Every claim is machine-verified. -2009 tests passing. -1530 files scanned. +2013 tests passing. +1531 files scanned. 0 boundary violations. 18/18 release gate legs. diff --git a/docs/claims-registry.json b/docs/claims-registry.json index b7eee56..e283eb1 100644 --- a/docs/claims-registry.json +++ b/docs/claims-registry.json @@ -49,7 +49,7 @@ "recheck": "npm test", "external": false, "derived": { - "testsTotal": 2009 + "testsTotal": 2013 }, "deriveError": null, "downgraded": null, @@ -68,7 +68,7 @@ "recheck": "npm run boundary:audit", "external": false, "derived": { - "filesScanned": 1530, + "filesScanned": 1531, "violations": 0 }, "deriveError": null, diff --git a/docs/numbers.json b/docs/numbers.json index ac9185f..1b78884 100644 --- a/docs/numbers.json +++ b/docs/numbers.json @@ -8,7 +8,7 @@ { "id": "tests", "label": "Tests (full suite, machine-pinned)", - "value": 2009, + "value": 2013, "unit": "tests", "source": "docs/state-snapshot.json#testsTotal", "note": "Pass count of the last green `npm test`; the suite asserts this number." @@ -16,7 +16,7 @@ { "id": "boundary-files", "label": "Boundary audit — files scanned", - "value": 1530, + "value": 1531, "unit": "files", "source": "docs/state-snapshot.json#boundaryAudit.filesScanned", "note": "Tracked files from `git ls-files` (ignored trees such as var/ are not counted)." diff --git a/docs/owner-execution/NPM-PUBLISH-READINESS-AND-STEPS.md b/docs/owner-execution/NPM-PUBLISH-READINESS-AND-STEPS.md index acebf87..5ab91cf 100644 --- a/docs/owner-execution/NPM-PUBLISH-READINESS-AND-STEPS.md +++ b/docs/owner-execution/NPM-PUBLISH-READINESS-AND-STEPS.md @@ -1,7 +1,7 @@ # npm Publication — Execution Record (post-publish truth sync) **Status:** publication executed on **2026-11-18** (owner-authorized). This document retains the readiness/steps context below and records what was actually published. -**Measured repo state (canonical):** 2009/2009 tests, 1312 files / 0 boundary violations (`docs/state-snapshot.json`), CI green on `main` context as recorded in repo docs. +**Measured repo state (canonical):** 2013/2013 tests, 1312 files / 0 boundary violations (`docs/state-snapshot.json`), CI green on `main` context as recorded in repo docs. ## 0) Publication outcome (recorded) diff --git a/docs/state-snapshot.json b/docs/state-snapshot.json index 30f1aa0..975e2f5 100644 --- a/docs/state-snapshot.json +++ b/docs/state-snapshot.json @@ -2,9 +2,9 @@ "measuredAtUtc": "2026-11-23T18:32:04Z", "gitCommit": "fdfbb05c944b73a84f39980da5480a6df4f2ad50", "commitsAheadOfV060": 555, - "testsTotal": 2009, + "testsTotal": 2013, "boundaryAudit": { - "filesScanned": 1530, + "filesScanned": 1531, "violations": 0, "check": "PASS" }, diff --git a/index.html b/index.html index 668f42c..0e87d8a 100644 --- a/index.html +++ b/index.html @@ -61,7 +61,7 @@

The Killer Ladder

Proof

-

2009 tests passing · deterministic L2 replay · live Core Mainnet anchor VERIFIED.

+

2013 tests passing · deterministic L2 replay · live Core Mainnet anchor VERIFIED.

Company

diff --git a/packages/agent-commerce/aer1.mjs b/packages/agent-commerce/aer1.mjs index b134e44..97e690e 100644 --- a/packages/agent-commerce/aer1.mjs +++ b/packages/agent-commerce/aer1.mjs @@ -446,6 +446,236 @@ function freeze(value) { return Object.freeze(value); } +/** + * AER-1 timelines — the part of the record that lives across receipts. + * + * Three constructions are implemented here, each pinned by the corpus: + * v1 draft Section 7 before -07: entry digest over the decoded bytes + * v07 entry digest binds prev_digest, seq, job_id, close, id, tool, + * provenance_class and the output commitment, serialized as canonical + * JSON with member names sorted by code point and strings escaped per + * RFC 8259, non-ASCII as \uXXXX + * workflow a binary Merkle tree over step leaves: receipt_id (receipt-id-v0) + * or "seq:output_hash" (seq-output-v1), last-duplicate on odd levels + * + * Boundary, standing: no clock, no network, no anchoring. A chain that verifies + * proves its own order and metadata; it does not prove the work happened. + */ +export const AER1_CHAIN_VERSIONS = Object.freeze(["v1", "v07"]); +export const AER1_MERKLE_VERSIONS = Object.freeze(["receipt-id-v0", "seq-output-v1"]); + +const ZERO_DIGEST = "0".repeat(64); +const LOWER_HEX_64 = /^[0-9a-f]{64}$/; +const isLowerHex64 = (value) => typeof value === "string" && LOWER_HEX_64.test(value); +const isNonEmptyString = (value) => typeof value === "string" && value.length > 0; + +/** RFC 8259 string escaping with every non-ASCII code point written as \uXXXX. */ +function aer1Escape(value) { + let out = ""; + for (const char of value) { + const cp = char.codePointAt(0); + if (char === '"') out += '\\"'; + else if (char === "\\") out += "\\\\"; + else if (cp === 0x08) out += "\\b"; + else if (cp === 0x09) out += "\\t"; + else if (cp === 0x0a) out += "\\n"; + else if (cp === 0x0c) out += "\\f"; + else if (cp === 0x0d) out += "\\r"; + else if (cp < 0x20) out += `\\u${cp.toString(16).padStart(4, "0")}`; + else if (cp > 0x7e) { + if (cp > 0xffff) { + const offset = cp - 0x10000; + out += "\\u" + (0xd800 + (offset >> 10)).toString(16) + "\\u" + (0xdc00 + (offset & 0x3ff)).toString(16); + } else out += `\\u${cp.toString(16).padStart(4, "0")}`; + } else out += char; + } + return out; +} +const aer1Quoted = (value) => `"${aer1Escape(String(value))}"`; + +const sha256Hex = (buffer) => createHash("sha256").update(buffer).digest("hex"); + +/** The v1 entry digest: SHA-256 over the base64-decoded canonical bytes. */ +function entryDigestV1(entry) { + if (!isNonEmptyString(entry?.canonical_bytes)) return null; + return sha256Hex(Buffer.from(entry.canonical_bytes, "base64")); +} + +/** + * The v07 entry digest: canonical JSON with exactly the eight members named in + * Section 7.1, sorted by code point, no whitespace outside strings. + */ +function entryDigestV07(entry) { + if (!isNonEmptyString(entry?.canonical_bytes)) return null; + const output = sha256Hex(Buffer.from(entry.canonical_bytes, "base64")); + const members = [ + ["close", entry.close === undefined ? false : entry.close], + ["id", entry.id], + ["job_id", entry.job_id], + ["output_hash", output], + ["prev_digest", entry.prev_digest], + ["provenance_class", entry.provenance_class], + ["seq", entry.seq], + ["tool", entry.tool], + ]; + const body = members + .map(([key, value]) => { + const encoded = + typeof value === "number" && Number.isInteger(value) + ? String(value) + : typeof value === "boolean" + ? String(value) + : aer1Quoted(value ?? ""); + return `${aer1Quoted(key)}:${encoded}`; + }) + .join(","); + return sha256Hex(Buffer.from(`{${body}}`, "utf8")); +} + +/** + * verifyAer1Chain(timeline, { version }) + * + * Returns { version, ok, checks, code } and never throws on hostile input. The + * checks are named so a caller can report which rule refused a timeline. + */ +export function verifyAer1Chain(timeline, { version = "v07" } = {}) { + const checks = []; + const add = (name, ok) => checks.push({ name, ok }); + const done = (code) => ({ version, ok: checks.every((c) => c.ok), checks, code: checks.every((c) => c.ok) ? null : code }); + + if (!AER1_CHAIN_VERSIONS.includes(version)) return { version, ok: false, checks: [], code: "CHAIN_VERSION_UNSUPPORTED" }; + add("timeline is a non-empty array", Array.isArray(timeline) && timeline.length > 0); + if (!Array.isArray(timeline) || timeline.length === 0) return done("CHAIN_EMPTY"); + + const first = timeline[0]; + add("first entry carries the zero genesis digest", first?.prev_digest === ZERO_DIGEST); + + let linksOk = true; + let metadataOk = true; + let closeOk = true; + for (let i = 0; i < timeline.length; i += 1) { + const entry = timeline[i] ?? {}; + if (i > 0) { + const previous = timeline[i - 1]; + const expected = version === "v07" ? entryDigestV07(previous) : entryDigestV1(previous); + if (expected === null || entry.prev_digest !== expected) linksOk = false; + } + if (entry.close !== undefined && typeof entry.close !== "boolean") closeOk = false; + if (i < timeline.length - 1 && entry.close === true) closeOk = false; + if (version === "v07") { + if (!Number.isInteger(entry.seq) || entry.seq !== i + 1) metadataOk = false; + if (!isNonEmptyString(entry.job_id) || entry.job_id !== first.job_id) metadataOk = false; + if (!isNonEmptyString(entry.id)) metadataOk = false; + if (!isNonEmptyString(entry.tool)) metadataOk = false; + if (!isNonEmptyString(entry.provenance_class)) metadataOk = false; + } + } + + add("every link recomputes from the previous entry", linksOk); + if (version === "v07"){ + add("seq is contiguous from 1 and the job id is constant", metadataOk); + add("each entry names an id, tool and provenance class", metadataOk); + } + add("close is boolean and true only on the last entry", closeOk); + add("the timeline ends with a closing entry", timeline[timeline.length - 1]?.close === true); + + return done(!linksOk ? "CHAIN_LINK_MISMATCH" : !metadataOk ? "CHAIN_METADATA_INVALID" : "CHAIN_NOT_CLOSED"); +} + +/** + * verifyAer1Commitment(timeline, commitment, { entryCountLexeme }) + * + * The external commitment binds a chain's job, length, final entry digest and + * publication time. `entryCountLexeme` is the raw JSON text of entry_count when + * the caller has it: `5.0` is the same number as `5` but a different claim, and + * the corpus rejects the fractional spelling. + */ +export function verifyAer1Commitment(timeline, commitment, { entryCountLexeme } = {}) { + const checks = []; + const add = (name, ok) => checks.push({ name, ok }); + const chain = verifyAer1Chain(timeline, { version: "v07" }); + add("the timeline verifies under the v07 chain rules", chain.ok); + const isObjectCommitment = isObject(commitment); + add("commitment is an object", isObjectCommitment); + + if (isObjectCommitment) { + add( + "commitment carries job_id, final_entry_digest, entry_count and published_at", + ["job_id", "final_entry_digest", "entry_count", "published_at"].every((key) => commitment[key] !== undefined), + ); + const jobOk = isNonEmptyString(commitment.job_id) && Array.isArray(timeline) && timeline[0]?.job_id === commitment.job_id; + add("commitment job_id matches the timeline's job", jobOk); + + const finalDigest = Array.isArray(timeline) && timeline.length > 0 ? entryDigestV07(timeline[timeline.length - 1]) : null; + add( + "final_entry_digest is lowercase hex and matches the last entry", + isLowerHex64(commitment.final_entry_digest) && finalDigest !== null && commitment.final_entry_digest === finalDigest, + ); + + const countOk = + Number.isInteger(commitment.entry_count) && Array.isArray(timeline) && commitment.entry_count === timeline.length; + const lexemeOk = entryCountLexeme === undefined || entryCountLexeme === null || !/[.eE]/.test(entryCountLexeme); + add("entry_count is an integer equal to the number of entries", countOk && lexemeOk); + + add("published_at is an RFC 3339 timestamp", isRfc3339(commitment.published_at) && typeof commitment.published_at === "string"); + } + + return { ok: checks.every((c) => c.ok), checks, code: checks.every((c) => c.ok) ? null : "COMMITMENT_INVALID" }; +} + +/** + * verifyAer1WorkflowMerkle({ steps, merkleRoot, merkleVersion, merkleVersionPresent }) + * + * Leaf construction follows the declared merkle_version; an absent member means + * receipt-id-v0. An unknown version is a refusal, never a guess: the two + * constructions give different roots for the same workflow. + */ +export function verifyAer1WorkflowMerkle({ steps, merkleRoot, merkleVersion, merkleVersionPresent = true } = {}) { + const checks = []; + const add = (name, ok) => checks.push({ name, ok }); + const declared = merkleVersionPresent === false || merkleVersion === undefined ? "receipt-id-v0" : merkleVersion; + add("merkle_version is one this build implements", AER1_MERKLE_VERSIONS.includes(declared)); + + const stepsOk = + Array.isArray(steps) && + steps.length > 0 && + steps.every((step, index) => isObject(step) && step.seq === index + 1 && isNonEmptyString(step.receipt_id)); + add("steps are a non-empty ordered array with seq from 1", stepsOk); + + if (stepsOk) { + const ids = steps.map((step) => step.receipt_id); + add("no receipt id appears twice", new Set(ids).size === ids.length); + if (declared === "seq-output-v1") { + add("every step carries an output_hash", steps.every((step) => isLowerHex64(String(step.output_hash ?? "").replace(/^sha256:/, "")))); + } + } + + let computed = null; + if (stepsOk && AER1_MERKLE_VERSIONS.includes(declared)) { + const leaf = (step) => + declared === "seq-output-v1" + ? sha256Hex(Buffer.from(`${step.seq}:${String(step.output_hash).replace(/^sha256:/, "")}`, "utf8")) + : sha256Hex(Buffer.from(step.receipt_id, "utf8")); + let level = steps.map((step) => Buffer.from(leaf(step), "hex")); + while (level.length > 1) { + if (level.length % 2 === 1) level = [...level, level[level.length - 1]]; + const next = []; + for (let i = 0; i < level.length; i += 2) { + next.push(Buffer.from(sha256Hex(Buffer.concat([level[i], level[i + 1]])), "hex")); + } + level = next; + } + computed = level[0].toString("hex"); + } + + add( + "merkle_root is lowercase hex and matches the recomputed root", + computed !== null && isLowerHex64(merkleRoot) && computed === merkleRoot, + ); + + return { ok: checks.every((c) => c.ok), computed, declared, checks, code: checks.every((c) => c.ok) ? null : "WORKFLOW_MERKLE_INVALID" }; +} + /** Self-check: the parser's own invariants, for callers that cannot run tests. */ export function selfCheck() { const bytes = Buffer.from(JSON.stringify({ receipt_schema_version: "0.3", output: { text: "ok" } }), "utf8"); diff --git a/scripts/aer1-interop.mjs b/scripts/aer1-interop.mjs index df6b254..f00969e 100644 --- a/scripts/aer1-interop.mjs +++ b/scripts/aer1-interop.mjs @@ -22,7 +22,13 @@ import { readFileSync, writeFileSync, existsSync, mkdirSync } from "node:fs"; import { createHash } from "node:crypto"; import { join, dirname } from "node:path"; import { fileURLToPath, pathToFileURL } from "node:url"; -import { parseAer1Record, AER1_PARSER_VERSION } from "../packages/agent-commerce/aer1.mjs"; +import { + parseAer1Record, + AER1_PARSER_VERSION, + verifyAer1Chain, + verifyAer1Commitment, + verifyAer1WorkflowMerkle, +} from "../packages/agent-commerce/aer1.mjs"; const here = dirname(fileURLToPath(import.meta.url)); const ROOT = join(here, ".."); @@ -94,9 +100,16 @@ export function parseKitColumn(text) { return { checks, footer }; } -/** A kit check either ends in a refusal or in a pass; the note names the reason. */ -const kitOutcome = (check) => - check.note !== null && /rejected|verification failed|outcome: invalid/.test(check.note) ? "invalid" : "verified"; +/** + * A kit line only carries a per-vector verdict when its note names one. A bare + * PASS means "this check behaved as expected", not "the record verified" — the + * kit's own column says so, and inventing the stronger reading would turn every + * expected-invalid vector into a fake divergence. + */ +const kitOutcome = (check) => { + if (check.note === null) return null; + return /rejected|verification failed|outcome: invalid/.test(check.note) ? "invalid" : "verified"; +}; function loadKitColumn() { if (!existsSync(KIT_COLUMN_FILE)) throw new Error(`reference kit column missing: ${KIT_COLUMN_FILE}`); @@ -145,15 +158,17 @@ function buildKitJoin(kit, observedByName, idRows) { const orphans = []; for (const c of kit.checks) { const key = KIT_FAMILY_TO_OURS[c.family] ?? c.family; - const row = rows.get(key) ?? { key, checks: 0, verified: 0, invalid: 0, compared: 0, divergences: [], notCompared: 0 }; + const row = rows.get(key) ?? { key, checks: 0, verified: 0, invalid: 0, compared: 0, oursJudged: 0, divergences: [], notCompared: 0 }; row.checks += 1; - if (kitOutcome(c) === "invalid") row.invalid += 1; - else row.verified += 1; + const kitVerdict = kitOutcome(c); + if (kitVerdict === "invalid") row.invalid += 1; + else if (kitVerdict === "verified") row.verified += 1; const ours = observedByName.get(c.name); if (RECORD_FAMILIES.has(key) && ours === undefined) orphans.push(c.name); - if (ours !== undefined && ours !== "not_checked") { + if (ours !== undefined && ours !== "not_checked") row.oursJudged += 1; + if (ours !== undefined && ours !== "not_checked" && kitVerdict !== null) { row.compared += 1; - if (ours !== kitOutcome(c)) row.divergences.push({ name: c.name, ours, kit: kitOutcome(c), note: c.note }); + if (ours !== kitVerdict) row.divergences.push({ name: c.name, ours, kit: kitVerdict, note: c.note }); } else { row.notCompared += 1; } @@ -164,6 +179,7 @@ function buildKitJoin(kit, observedByName, idRows) { const idRow = rows.get("id-binding"); if (idRow !== undefined && idRows !== undefined) { idRow.compared = idRows.length; + idRow.oursJudged = idRows.length; idRow.divergences = idRows.filter((r) => !r.agree).map((r) => ({ name: r.name, ours: "disagree", kit: "pass", note: null })); } return { rows, orphans }; @@ -200,9 +216,26 @@ function runCorpus() { continue; } if (Array.isArray(data.vectors)) { - // timeline / commitment / anchor families: not implemented in this build - same.notChecked += Number(f.vectors) || 0; - for (const v of data.vectors) notChecked.push({ path: f.path, name: v.name, family: "timeline" }); + const verdicts = classifyTimeline(f.path, data.vectors, text); + if (verdicts === null) { + // anchor family: still not implemented in this build + same.notChecked += Number(f.vectors) || 0; + for (const v of data.vectors) notChecked.push({ path: f.path, name: v.name, family: "timeline" }); + families.set(f.path, same); + continue; + } + for (const verdict of verdicts) { + observedByName.set(verdict.name, verdict.observed); + if (verdict.observed === verdict.expected) { + same.agree += 1; + } else if (verdict.observed === "verified" && verdict.expected === "invalid") { + same.falseAccept += 1; + falseAccepts.push({ path: f.path, name: verdict.name, reason: verdict.reason }); + } else { + same.falseReject += 1; + falseRejects.push({ path: f.path, name: verdict.name, reason: verdict.reason }); + } + } families.set(f.path, same); continue; } @@ -271,6 +304,57 @@ function runCorpus() { }; } +/** The raw JSON text of one vector, for facts a parsed object has already lost. */ +function rawVectorSlice(text, name) { + const key = `"name": ${JSON.stringify(name)}`; + const start = text.indexOf(key); + if (start === -1) return ""; + const next = text.indexOf('"name":', start + key.length); + return text.slice(start, next === -1 ? text.length : next); +} + +const entryCountLexeme = (text, name) => + /"entry_count"\s*:\s*(-?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?)/.exec(rawVectorSlice(text, name))?.[1] ?? null; + +/** + * Timeline families this build judges. Returns null for a family it does not, + * so "not implemented" stays visible instead of being counted as agreement. + */ +function classifyTimeline(path, vectors, text) { + const verdict = (v, result) => ({ + name: v.name, + expected: v.expected_verdict === "valid" ? "verified" : "invalid", + observed: result.ok ? "verified" : "invalid", + reason: result.checks.filter((c) => !c.ok).map((c) => c.name).join("; ") || null, + }); + + if (path.endsWith("chain-vectors-v07.json")) { + return vectors.map((v) => verdict(v, verifyAer1Chain(v.timeline, { version: "v07" }))); + } + if (path.endsWith("chain-vectors.json")) { + return vectors.map((v) => verdict(v, verifyAer1Chain(v.timeline, { version: "v1" }))); + } + if (path.endsWith("commitment-vectors.json")) { + return vectors.map((v) => + verdict(v, verifyAer1Commitment(v.timeline, v.commitment, { entryCountLexeme: entryCountLexeme(text, v.name) })), + ); + } + if (path.endsWith("workflow-merkle-seq-output-v1.json")) { + return vectors.map((v) => + verdict( + v, + verifyAer1WorkflowMerkle({ + steps: v.steps, + merkleRoot: v.merkle_root, + merkleVersion: v.merkle_version, + merkleVersionPresent: v.merkle_version !== undefined, + }), + ), + ); + } + return null; +} + /** The two pairs Brennan asked for: a live receipt, and an id-binding swap. */ function interopPairs() { const liveText = readFileSync(join(CORPUS, "base/test-vectors/valid/receipt-03-live.json"), "utf8"); @@ -337,11 +421,13 @@ function render(report) { .join(" · "); const kit = k === undefined ? "—" : `${k.checks} ${k.checks === 1 ? "check" : "checks"}, all as expected${k.invalid ? ` · ${k.invalid} refused` : ""}`; const divergence = - k === undefined || k.compared === 0 + k === undefined || k.oursJudged === 0 ? "— (not judged by CG-AER1/1)" - : k.divergences.length === 0 - ? `0 of ${k.compared}` - : k.divergences.map((d) => `\`${d.name}\``).join(", "); + : k.compared === 0 + ? "— (kit line carries no per-vector verdict)" + : k.divergences.length === 0 + ? `0 of ${k.compared}` + : k.divergences.map((d) => `\`${d.name}\``).join(", "); out.push(`| \`${key}\` | ${g.vectors} | ${ours} | ${kit} | ${divergence} |`); } out.push(""); diff --git a/test/integrations/aer1-interop.test.mjs b/test/integrations/aer1-interop.test.mjs index 75cb54c..fbe7f7c 100644 --- a/test/integrations/aer1-interop.test.mjs +++ b/test/integrations/aer1-interop.test.mjs @@ -37,6 +37,21 @@ test("AER-1 interop: the published table matches the code and the known defect c // invalid and CG-AER1/1 now refuses every one of them; a regression adds a // name here instead of passing quietly. assert.equal(report.totals.falseAccept, 0, "false accepts must stay at zero"); + assert.equal(report.totals.falseReject, 0, "a timeline family must not be refused as a whole"); + assert.equal(report.totals.notChecked, 49, "only the unimplemented families may remain not checked"); + + // The three timeline families are judged now; the corpus expectation is met + // for every vector, which is what moved these rows out of not-checked. + const byPath = Object.fromEntries(report.families.map((f) => [f.path, f])); + assert.deepEqual( + { + chainV1: [byPath["base/chain-vectors.json"].agree, byPath["base/chain-vectors.json"].vectors], + chainV07: [byPath["base/chain-vectors-v07.json"].agree, byPath["base/chain-vectors-v07.json"].vectors], + commitment: [byPath["base/commitment-vectors.json"].agree, byPath["base/commitment-vectors.json"].vectors], + workflow: [byPath["workflow-merkle-seq-output-v1.json"].agree, byPath["workflow-merkle-seq-output-v1.json"].vectors], + }, + { chainV1: [7, 7], chainV07: [28, 28], commitment: [8, 8], workflow: [8, 8] }, + ); assert.deepEqual(report.falseAccepts.map((f) => f.name), []); assert.equal(report.pairs.live.name, "receipt-03-live"); diff --git a/test/integrations/aer1-timeline-checks.test.mjs b/test/integrations/aer1-timeline-checks.test.mjs new file mode 100644 index 0000000..ed0b614 --- /dev/null +++ b/test/integrations/aer1-timeline-checks.test.mjs @@ -0,0 +1,109 @@ +/** + * AER-1 timelines — chain v1, chain -07, the external commitment, and the + * workflow Merkle root. Each family test runs the whole pinned family and + * asserts the corpus outcome, so a rule that is too weak shows up as a + * false accept and a rule that is too strong shows up as a false reject. + */ + +import { test } from "node:test"; +import assert from "node:assert/strict"; +import { readFileSync } from "node:fs"; +import { fileURLToPath } from "node:url"; +import { dirname, join } from "node:path"; +import { + verifyAer1Chain, + verifyAer1Commitment, + verifyAer1WorkflowMerkle, +} from "../../packages/agent-commerce/aer1.mjs"; + +const here = dirname(fileURLToPath(import.meta.url)); +const CORPUS = join(here, "../fixtures/aer1-corpus-v1.5.7"); + +function family(relative) { + const text = readFileSync(join(CORPUS, relative), "utf8"); + return { text, vectors: JSON.parse(text).vectors }; +} + +function judged(vectors, verify) { + return vectors.map((v) => ({ + name: v.name, + expected: v.expected_verdict === "valid" ? "verified" : "invalid", + observed: verify(v).ok ? "verified" : "invalid", + })); +} + +function assertFamily(rows) { + const wrong = rows.filter((r) => r.observed !== r.expected); + assert.deepEqual(wrong, [], `expected-outcome mismatches: ${JSON.stringify(wrong, null, 2)}`); +} + +test("chain v1: links over the decoded bytes, and only the last entry closes", () => { + const { vectors } = family("base/chain-vectors.json"); + assertFamily(judged(vectors, (v) => verifyAer1Chain(v.timeline, { version: "v1" }))); + + const tampered = vectors.find((v) => v.name === "chain-tampered-middle"); + const refused = verifyAer1Chain(tampered.timeline, { version: "v1" }); + assert.equal(refused.ok, false); + assert.ok(refused.checks.some((c) => !c.ok && c.name.includes("link"))); +}); + +test("chain -07: metadata is bound into the entry digest", () => { + const { vectors } = family("base/chain-vectors-v07.json"); + assertFamily(judged(vectors, (v) => verifyAer1Chain(v.timeline, { version: "v07" }))); + + // Relabelling a field that the digest binds must break the link, and the + // encoding vectors only pass when the canonical serialization matches. + for (const name of ["v07-relabel-provenance", "v07-relabel-tool-id", "ax-esc-hex-upper", "x-encoding-draft-literal"]) { + const v = vectors.find((x) => x.name === name); + assert.equal(verifyAer1Chain(v.timeline, { version: "v07" }).ok, false, name); + } + const reference = vectors.find((x) => x.name === "x-encoding-reference"); + assert.equal(verifyAer1Chain(reference.timeline, { version: "v07" }).ok, true, "canonical escaping is the reference form"); +}); + +test("commitment: job, length, final digest and a non-fractional count", () => { + const { text, vectors } = family("base/commitment-vectors.json"); + const lexeme = (name) => { + const start = text.indexOf(`"name": "${name}"`); + const slice = text.slice(start, text.indexOf('"name":', start + 8) === -1 ? text.length : text.indexOf('"name":', start + 8)); + return /"entry_count"\s*:\s*(-?\d+(?:\.\d+)?)/.exec(slice)?.[1] ?? null; + }; + + assertFamily( + judged(vectors, (v) => verifyAer1Commitment(v.timeline, v.commitment, { entryCountLexeme: lexeme(v.name) })), + ); + + const floatVector = vectors.find((v) => v.name === "x-entry-count-float"); + assert.equal(lexeme("x-entry-count-float"), "5.0"); + assert.equal(verifyAer1Commitment(floatVector.timeline, floatVector.commitment).ok, true, "5.0 and 5 are the same number once parsed"); + assert.equal( + verifyAer1Commitment(floatVector.timeline, floatVector.commitment, { entryCountLexeme: "5.0" }).ok, + false, + "a fractional spelling is a different claim and must be refused", + ); +}); + +test("workflow Merkle: both constructions, one tree rule", () => { + const { vectors } = family("workflow-merkle-seq-output-v1.json"); + assertFamily( + judged(vectors, (v) => + verifyAer1WorkflowMerkle({ + steps: v.steps, + merkleRoot: v.merkle_root, + merkleVersion: v.merkle_version, + merkleVersionPresent: v.merkle_version !== undefined, + }), + ), + ); + + const single = vectors.find((v) => v.name === "seq-output-v1-single-step"); + const result = verifyAer1WorkflowMerkle({ steps: single.steps, merkleRoot: single.merkle_root, merkleVersion: "seq-output-v1" }); + assert.equal(result.ok, true); + assert.equal(result.computed, single.merkle_root, "a single leaf is the root"); + + // The two constructions give different roots for the same steps; a verifier + // that substituted one for the other would confirm nothing. + const legacy = verifyAer1WorkflowMerkle({ steps: single.steps, merkleRoot: single.merkle_root, merkleVersion: "receipt-id-v0" }); + assert.equal(legacy.ok, false); + assert.equal(verifyAer1WorkflowMerkle({ steps: single.steps, merkleRoot: single.merkle_root, merkleVersion: "future-v9" }).ok, false); +});