Skip to content

[KB-05] Prepare trusted 0.1.1 release with registry Agent Access proof - #8

Merged
FlyOverCoderKY merged 2 commits into
mainfrom
claude/kb-05-first-release
Nov 7, 2026
Merged

FlyOverCoderKY merged 2 commits into
mainfrom
claude/kb-05-first-release

Conversation

@FlyOverCoderKY

Copy link
Copy Markdown
Contributor

Prepares the synchronized Knowledge Base 0.1.1 set for its first advertised trusted release. The protocol proof now installs exact registry @pegma/agent-access@0.1.1, checks its official resolution and reviewed SHA-512, and exercises all four packed KB packages through the existing SDK fixture. The former source-producer override is rejected.

Records the completed manual bootstrap and verified Agent Access release, with exact artifact/provenance receipts. KB publication and actual two-host/client acceptance remain separate gates in KB-05.

Validation: frozen install; format and type checks; 32 focused MCP/security tests; 128 release regression cases (125 pass, 3 Windows symlink-permission skips); synthetic guide workflow; four-package artifact check and updated authenticated protocol proof (4 packed + 1 registry, all positive/negative scenarios pass); removed-source-override rejection. Both required Node CI lanes must run the complete runtime/release suite, examples, artifacts, and protocol proof before merge.

Release operations follow the protected signed tag, exact prepared artifact, approved npm environment, and separate unprivileged registry/provenance/consumer verification workflow. Real host logins and requested client applications remain pending.

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

OpenRouter review posted (clean). #8 (review)

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-11-07T22:51:46.957101Z a3354ec Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copy link
Copy Markdown
Contributor Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 5be3e179f8

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OpenRouter pull-request review

Verdict: issues
Scope: full-pr (full-pr)
Mode: initial
Commit: 5be3e179f87fc6309bdd52a310e2db7874ef62f7
Judge: openai/gpt-5.6-luna
Cost: $0.2457 (lanes $0.2411 + judge $0.0046)

Lanes

  • meta/muse-spark-1.2: ok (4 finding(s), 37.2s, 141821+5426 tokens (21858 cached), 3 tool round(s), via Meta, $0.18)
  • z-ai/glm-5.3-flash: ok (4 finding(s), 136.4s, 1596520+24018 tokens (1526080 cached), 27 tool round(s), via Particle AI, $0.0648)

Warning

meta/muse-spark-1.2: coverage claims 1 finding(s) in 'packages/mcp/README.md' but 0 were reported

Findings

🟠 Issue 1 — Hardcoded MCP server version will drift from package version

packages/mcp/src/mcp.ts:335 · risk · identified by meta/muse-spark-1.2

Concrete failure: createKnowledgeAgentMcp advertises version: "0.1.1" as a literal in packages/mcp/src/mcp.ts:335 while packages/mcp/package.json and the workspace also declare 0.1.1. The next synchronized bump requires editing two places; if only package.json is bumped the MCP initialize response reports the wrong version, breaking version-gated clients and provenance checks that expect server version == package version.

The literal is not derived from the package manifest and no test asserts equality. The release manifest and release:check pack verification would not catch it because they inspect tarball files, not the runtime Server constructor argument.

Checked packages/mcp/src/mcp.ts (hardcoded string), packages/mcp/package.json (0.1.1), packages/application/package.json and packages/core/package.json (all 0.1.1), and tests/release/fixtures.mjs which still fixtures 0.1.0 and would not catch the drift. No grep for version sourcing from package.json found. Proof gap: did not execute pnpm run build to see if a build-time injection replaces it.

🟠 Issue 2 — Package READMEs link to not-yet-existent v0.1.1 tag

packages/application/README.md:8 · risk · identified by meta/muse-spark-1.2

Concrete failure: packages/application/README.md and packages/mcp/README.md were changed to target https://github.com/pegma-dev/knowledge-base/blob/v0.1.1/.... docs/BOOTSTRAP.md, docs/RELEASING.md, and README.md all state source 0.1.1 is a candidate, remains unpublished, and the v0.1.1 tag/release are still pending and require review, current-head gates, and trusted-publisher verification. Clicking those README links before the tag exists returns 404, and external consumers/docs scrapers will treat it as broken documentation.

The prior main links were intentionally unfrozen; the new links are frozen too early. The same pattern appears in six places in packages/application/README.md (v0.1.1/docs/*, v0.1.1/packages/...) and three in packages/mcp/README.md.

Checked docs/BOOTSTRAP.md#First advertised trusted release (explicitly pending), docs/RELEASING.md:16 (expects pending v0.1.1), and grepped v0.1.1 across the checkout. No v0.1.1 tag exists in the reviewed commit.

🔵 Issue 3 — Package README documentation links target the not-yet-existing v0.1.1 tag and 404 on main until release

packages/application/README.md:9 · nit · identified by z-ai/glm-5.3-flash

Between merging this PR and cutting the v0.1.1 tag, every documentation link in the published-package READMEs resolves to https://github.com/pegma-dev/knowledge-base/blob/v0.1.1/..., which does not exist yet — a reader on main gets 404s for every linked contract document.

  • packages/application/README.md: docs/COLLECTIONS.md, docs/HOST_COMPOSITION.md, docs/RETRIEVAL.md, packages/application/src/types.ts, docs/COLLECTIONS.md#physical-representation-and-hard-bounds, and docs/RELEASING.md all switched from blob/main to blob/v0.1.1.
  • packages/mcp/README.md: docs/HOST_COMPOSITION.md, docs/RETRIEVAL.md, and docs/RELEASING.md likewise.

docs/RELEASING.md discloses that "that candidate tag and trusted release remain pending", so the intent is deliberate, but the disclosure does not repair the links: if the KB release slips or is abandoned, main carries indefinitely broken documentation links, and the previous text ("release preparation must pin those references to verified release source before first publication") deferred the pin to the release instead of breaking links immediately. Suggest either keeping main links until the tag exists or noting the pending-tag state in the package READMEs themselves.

🟠 Issue 4 — Release regression fixtures still pin 0.1.0 while workspace is 0.1.1

tests/release/fixtures.mjs:19 · risk · identified by meta/muse-spark-1.2

Concrete failure: the synchronized source version was bumped to 0.1.1 in package.json, packages/*/package.json, pnpm-lock.yaml, and packages/mcp/src/mcp.ts, but tests/release/fixtures.mjs still defines identity.version: "0.1.0", identity.tag: "v0.1.0", and all specifications.*.dependencies as "0.1.0". tests/release/contract.test.mjs, manifest.test.mjs, arguments.test.mjs, etc., similarly hardcode 0.1.0. The pnpm test / test:release suite therefore validates manifest, argument, and registry behavior for the old version, not the candidate 0.1.1 that will actually be prepared/published/verified. A bug in exact-pin handling or manifest schema for 0.1.1 would not fail.

Checked tests/release/fixtures.mjs:19-21, :33, :41-42, :54-56, :109, :163, :286 and grepped 0.1.0 across tests/release/. No fixture was updated in this PR, even though scripts/release-packages.mjs is version-agnostic and the tests should parameterize the current synchronized version.

This is blast radius outside the diff; the PR touches version bumps but not the tests that pin the inventory.

🔵 Issue 5 — Agent Access integrity pin has no renewal or verification documentation

scripts/agent-protocol-proof.mjs:8 · nit · identified by meta/muse-spark-1.2

Concrete failure: scripts/agent-protocol-proof.mjs:7-9 pins agentAccessIntegrity to a specific sha512-... for registry.npmjs.org/@​pegma/agent-access/-/agent-access-0.1.1.tgz. If the registry re-signs, republishes metadata, or the maintainer publishes 0.1.2, the proof fails with assert.equal(lockedProducer.integrity, ...) until the literal is manually updated. There is no comment, doc, or script step saying where to re-derive the pin (e.g., npm view @​pegma/agent-access@​0.1.1 dist.integrity) and no test that the pin matches the actual registry value at review time.

The check itself (lockfile.packages["node_modules/@​pegma/agent-access"].integrity) is correct for npm@​11 lockfile v3, but the failure mode is an opaque assertion without remediation guidance, and the prior source-pinned path had its commit hash documented in docs/SOURCE_PREPARATION.md. The new registry pin lacks an equivalent documented derivation.

Checked scripts/agent-protocol-proof.mjs (constant and three assert.equal checks on installedProducer/lockedProducer), examples/agent/README.md (describes the check but not derivation), and docs/BOOTSTRAP.md (receipt for 0.1.1 lists artifact SHA-256 8a29c3... and manifest SHA aff861... but not this tarball integrity). Could not fetch the registry live (offline checkout) to validate the hash.

🔵 Issue 6 — test/README.md still claims all four KB packages are unpublished and describes the proof's "reviewed Agent Access artifacts"

test/README.md:77 · nit · identified by z-ai/glm-5.3-flash

After this PR's status updates, a maintainer reading test/README.md is told the opposite of what the rest of the repository now records: that all four KB packages remain unpublished and that agent:proof exercises "reviewed Agent Access artifacts" from the old source-fixture path. This contradicts docs/BOOTSTRAP.md's recorded manual 0.1.0 bootstrap receipt and the registry-producer composition this PR introduces.

  • test/README.md:77-78: "pnpm run agent:proof separately exercises the actual SDK and reviewed Agent Access artifacts in an isolated synthetic consumer" — no longer describes the registry @​pegma/agent-access@​0.1.1 producer.
  • test/README.md:82: "All four KB packages remain unpublished" — false per the PR's own bootstrap ledger; the 0.1.0 versions were uploaded and postflight-verified.

Evidence: grep -n unpublished across the repo leaves test/README.md:82 as the only remaining current-state "remain unpublished" claim; every other hit is the (correctly) unpublished 0.1.1 candidate or historical text. The PR updated AGENTS.md, README.md, all docs/*.md, and all package READMEs but missed this file. Cost: the repository treats status/provenance claims as review-gate material, and this stale claim invites a worker to re-plan publication or to expect a source-producer proof that no longer exists.

🟠 Issue 7 — Hardcoded Agent Access SHA-512 integrity pin has no in-repo provenance record to re-derive or audit it

scripts/agent-protocol-proof.mjs:18 · risk · identified by z-ai/glm-5.3-flash

The proof now anchors its producer trust in agentAccessIntegrity = "sha512-C8t2kkv2piE9Jxt48hrRj+..." (scripts/agent-protocol-proof.mjs:18-19), but no committed document records that value or ties it to the retained receipts. docs/BOOTSTRAP.md's verified Agent Access receipt records only the downloaded artifact-archive SHA-256 (8a29c3a6...) and the independently retained manifest SHA-256 (aff861e5...) — neither can be used to recompute or cross-check the tarball SHA-512 base64 string in the script.

Concrete failure cost: a transcription error in the constant (or a byte change between the reviewed pin and the registry) fails npm install integrity on both CI lanes and in publish.yml's validate job; because the proof suppresses all native output and outer catch prints only {passed:false, stage:4}, operators get no indication that the integrity pin — not the network or the registry — is the problem, and reviewers cannot verify the pin against the retained receipt the PR points to.

Checked: grep for sha512/integrity across docs/ finds no record of the Agent Access 0.1.1 tarball digest; the constant appears only in the script. Recommend recording the tarball SHA-512 (or the mapping from it to the retained manifest digest) in the docs/BOOTSTRAP.md#verified-agent-access-prerequisite receipt.

🔵 Issue 8 — Stripping every npm_config_* variable silently drops operator proxy/CA/mirror configuration the proof previously honored

scripts/agent-protocol-proof.mjs:131 · nit · identified by z-ai/glm-5.3-flash

The proof's new environment filter (scripts/agent-protocol-proof.mjs:131-136) removes all npm_config_* variables before the toolchain and consumer installs, and the temp npmrc plus --registry now hard-pin https://registry.npmjs.org/. In an environment that previously reached npm through npmrc-file-based configuration injected as environment variables — npm_config_proxy/npm_config_https_proxy (when not mirrored in HTTPS_PROXY), npm_config_cafile, or an npm_config_registry corporate mirror — the installs now require direct reachability of registry.npmjs.org and can fail at stage 1 (pnpm toolchain install) or stage 4, where they previously succeeded.

This hardening is intentional and documented ("official registry resolution", "The proof needs public npm registry access"), and HTTPS_PROXY/NODE_EXTRA_CA_CERTS still pass through, so the cost is limited to npmrc-file-style proxy/CA/mirror setups. Flagging so the breakage is a known, accepted tradeoff rather than a surprise in a locked-down CI environment.

Workflow run

Comment thread packages/mcp/src/mcp.ts
});
const server = new Server(
{ name: "@pegma/knowledge-base-mcp", version: "0.1.0" },
{ name: "@pegma/knowledge-base-mcp", version: "0.1.1" },

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 Hardcoded MCP server version will drift from package version (risk)

Concrete failure: createKnowledgeAgentMcp advertises version: "0.1.1" as a literal in packages/mcp/src/mcp.ts:335 while packages/mcp/package.json and the workspace also declare 0.1.1. The next synchronized bump requires editing two places; if only package.json is bumped the MCP initialize response reports the wrong version, breaking version-gated clients and provenance checks that expect server version == package version.

The literal is not derived from the package manifest and no test asserts equality. The release manifest and release:check pack verification would not catch it because they inspect tarball files, not the runtime Server constructor argument.

Checked packages/mcp/src/mcp.ts (hardcoded string), packages/mcp/package.json (0.1.1), packages/application/package.json and packages/core/package.json (all 0.1.1), and tests/release/fixtures.mjs which still fixtures 0.1.0 and would not catch the drift. No grep for version sourcing from package.json found. Proof gap: did not execute pnpm run build to see if a build-time injection replaces it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The claimed missing equality check is already present. scripts/release-packages.mjs:399-434 initializes the actual packed MCP adapter through its public HTTP API in a clean consumer, parses the initialize response, and asserts result.serverInfo.version === mcpManifest.version (line 434), as well as the package name. release:check runs in both Node CI lanes and inside agent:proof; a manifest-only future version bump fails this runtime assertion. This PR updates both values to 0.1.1. Keeping the explicit runtime literal preserves the Workers-compatible package and introduces no current drift. Leaving this finding visible for re-review.

Comment thread packages/application/README.md Resolved
Comment thread packages/application/README.md Resolved
Comment thread scripts/agent-protocol-proof.mjs Resolved
Comment thread scripts/agent-protocol-proof.mjs Resolved

Copy link
Copy Markdown
Contributor Author

Round-1 r1-4: the tests/release 0.1.0 values are independent synthetic release identities, fake registries/certificates and malformed-input fixtures, not an inventory of the current source release. releaseDependencies(directory, version) and the schema/identity/registry validators are version-parameterized; changing those fixtures to track production metadata would not add a 0.1.1-specific code path. The actual candidate is separately exercised by release:check: it reads the four current manifests, validates synchronized versions and exact internal pins, packs those bytes, installs them in a clean consumer, and asserts the actual MCP initialization version against its installed package manifest. The updated agent:proof executes that check and then exercises all four 0.1.1 artifacts with the verified registry producer. Both current-head Node CI lanes must pass these real-candidate checks plus all 128 independent release regressions before merge. We intentionally retain the stable synthetic fixture identities; this finding remains visible for re-review.

Copy link
Copy Markdown
Contributor Author

Round-1 r1-5/r1-6 fixed in a3354ec: the proof guide documents verified manifest-bound pin maintenance, paired reviewed version/integrity changes and Node22/24 proof gates. test/README now correctly describes exact registry Agent Access0.1.1 plus four packed KB artifacts, completed manual0.1.0 bootstrap, and pending KB0.1.1 trusted publication. The five-file documentation fixup passed formatting, byte checks and independent review; runtime, tests and protocol fixture are unchanged.

Copy link
Copy Markdown
Contributor Author

@codex security review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OpenRouter pull-request review

Verdict: clean
Scope: latest-commit (commit-range)
Mode: verify
Commit: a3354ec39c5cc0401f4a19b92e08f8aa95c946b3
Judge: openai/gpt-5.6-luna
Cost: $0.1523 (lanes $0.1522 + judge $0.0001)

Lanes

  • meta/muse-spark-1.2: ok (0 finding(s), 27.7s, 109680+4823 tokens (28002 cached), 3 tool round(s), via Meta, $0.13)
  • z-ai/glm-5.3-flash: ok (0 finding(s), 84.1s, 374765+16816 tokens (324352 cached), 14 tool round(s), via Together, $0.0254)

Round 2 resolution

  • 🤝 r1-1 disputed — Hardcoded MCP server version will drift from package version: Fixing agent's rebuttal is correct: scripts/release-packages.mjs 399-434 bootstraps a clean consumer, imports the packed MCP adapter, and asserts result.serverInfo.version === mcpManifest.version (and name) via the public HTTP API. release:check runs in both Node 22/24 CI lanes and inside agent:proof. Current literal at packages/mcp/src/mcp.ts:335 ("0.1.1") matches all four package.json versions (…
  • 🤝 r1-2 disputed — Package READMEs link to not-yet-existent v0.1.1 tag: The tag-pinned links remain (e.g. packages/application/README.md:8,9,11,46,119,136,143 and packages/mcp/README.md:47,49,80), but the updated README paragraphs now explicitly document the intentional tradeoff: the tag may still be pending during release preparation, is created after the reviewed merge and before publishing, and source readers get a working main-based DEVELOPMENT fallback (`do…
  • 🤝 r1-4 disputed — Release regression fixtures still pin 0.1.0 while workspace is 0.1.1: tests/release/fixtures.mjs identity 0.1.0 and specifications dependencies (lines 19-56) are synthetic fixtures exercising version-parameterized validators (releaseDependencies, schema/identity/registry checks). They are not an inventory of the current source release. The actual 0.1.1 candidate is separately exercised by scripts/release-packages.mjs prepare/verify path which reads synchronized mani…
  • ✅ r1-7 fixed correctly — Hardcoded Agent Access SHA-512 integrity pin has no in-repo provenance record to re-derive or audit it: docs/BOOTSTRAP.md now records full provenance for the pin: artifact ID 13592934200, retained manifest SHA-256 aff861e5..., prepared filename pegma-agent-access-0.1.1.tgz, SHA-1 e590e4c..., and SHA-512 sha512-C8t2kkv2piE9Jxt48hrRj+... identical to scripts/agent-protocol-proof.mjs:18-19, with text that hashes come from the independently digest-bound manifest and that the linked strict verification j…
  • 4 nit finding(s) from earlier rounds retired (severity floor for follow-up rounds is risk).
  • Open findings after this round: 0 (0 bug-severity).

No structured findings from the successful lane(s).

Workflow run

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: a3354ec39c

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OpenRouter pull-request review

Verdict: clean
Scope: full-pr (full-pr)
Mode: verify
Commit: a3354ec39c5cc0401f4a19b92e08f8aa95c946b3
Judge: openai/gpt-5.6-luna
Cost: $0.3145 (lanes $0.3144 + judge $0.0001)

Lanes

  • meta/muse-spark-1.2: ok (0 finding(s), 29.4s, 264564+4209 tokens (67411 cached), 5 tool round(s), via Meta, $0.27)
  • z-ai/glm-5.3-flash: ok (0 finding(s), 114.1s, 734291+16704 tokens (634880 cached), 18 tool round(s), via Friendli, $0.0399)

Round 3 resolution

  • No prior findings were open.
  • Open findings after this round: 0 (0 bug-severity).

No structured findings from the successful lane(s).

Workflow run

Copy link
Copy Markdown
Contributor Author

Merge-gate receipt for exact head a3354ec: independent final source and five-file fixup reviews are clean. Reopened CI42422367739 passed both Node22/24 lanes, each372 runtime+128 release tests with zero skips, example, four packed public-consumer/MCP-version checks and 4-packed-KB+1-registry-AA protocol proof. CodeQL42422367733 passed. Full-PR OpenRouter review5815442601 is clean with both lanes successful, no coverage warning and decoded round3 ledger zero OPEN. Standalone security receipt6714099321 reports no issues for this head. Fixed threads have SHA replies; evidence-based disputes remain visible.

Copilot requests were accepted at22:40:44Z and again after the documentation fixup. At23:10:59Z, after30minutes, no Copilot review, comment, requested-reviewer event or observable work-start/check exists. This is an absent review, not a clean Copilot result; no cause is inferred. Following dispatch-next's bounded-wait fallback, proceeding on the completed independent/code/security reviews and successful required checks. Superseded push-run cancellations were replaced by the successful current-head reopened runs. No CI or protection bypass.

@FlyOverCoderKY
FlyOverCoderKY merged commit 32086e4 into main Nov 7, 2026
6 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant