Skip to content

add release-path gate for MCP knowledge baseline freshness#54

Merged
jsuvic merged 3 commits into
masterfrom
phase-19-baseline-freshness-gate
Jul 4, 2026
Merged

add release-path gate for MCP knowledge baseline freshness#54
jsuvic merged 3 commits into
masterfrom
phase-19-baseline-freshness-gate

Conversation

@jsuvic

@jsuvic jsuvic commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • Implements the approved phase-19/002 spec addendum: makes review of the pinned KNOWLEDGE_BASELINES a mechanical part of the release path
  • scripts/check-baseline-age.mjs (fully offline, WS4-MCP-001 preserved) fails when any knownAsOf in packages/doctor/src/mcpSuggestions.ts is older than 6 calendar months relative to the build date; AGENT_PROFILE_BUILD_DATE overrides for deterministic verification
  • Wired as npm run verify:baseline-age into release-verify.yml and the docs/release.md pre-publish checklist only — unit tests and routine CI remain time-independent
  • Fails closed if the baseline module moves or contains no knownAsOf literals, so the gate cannot be silently disabled

Heads-up: the gate fires today, by design

knownAsOf is 2026-01-01, so builds dated after 2026-07-01 fail the gate until the baseline versions are reviewed and the date bumped. Verified both paths:

  • npm run verify:baseline-age -> exit 1 with the bump guidance
  • AGENT_PROFILE_BUILD_DATE=2026-06-30 node scripts/check-baseline-age.mjs -> exit 0

The first release after merge must review/bump KNOWLEDGE_BASELINES — that forced review is the point of the gate. Bumping knownAsOf here without actually re-reviewing the pinned versions would defeat it.

Test plan

  • Ran the script against the current tree (correctly stale) and with the spec''s override date (passes)
  • Release-path only: no changes to npm test or npm run check surfaces; verify:pack unaffected

🤖 Generated with Claude Code

Implements docs/specs/phase-19/002-baseline-freshness-release-gate.md
(approved addendum to phase-19/001):

- scripts/check-baseline-age.mjs: offline check that fails when any
  knownAsOf in packages/doctor/src/mcpSuggestions.ts is older than
  6 calendar months relative to the build date
  (AGENT_PROFILE_BUILD_DATE override for deterministic runs)
- npm run verify:baseline-age; wired into release-verify.yml and the
  docs/release.md pre-publish checklist only - npm test and routine
  CI stay time-independent
- fails closed when the baseline module or its knownAsOf literals
  cannot be found, so the gate cannot be silently disabled

Note: the gate correctly fails for builds dated after 2026-07-01
until KNOWLEDGE_BASELINES is reviewed and knownAsOf (2026-01-01) is
bumped - that review is exactly what the gate exists to force.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 4, 2026

Copy link
Copy Markdown

Deploying agent-profile with  Cloudflare Pages  Cloudflare Pages

Latest commit: f0db55d
Status: ✅  Deploy successful!
Preview URL: https://46fbbb61.agent-profile-6rc.pages.dev
Branch Preview URL: https://phase-19-baseline-freshness.agent-profile-6rc.pages.dev

View logs

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 31b028a8e5

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/check-baseline-age.mjs Outdated
Baseline review performed against the live npm registry (npm view
<pkg> version) on 2026-07-04, per the phase-19/002 release gate:

  react          19.0.0  -> 19.2.7
  react-dom      19.0.0  -> 19.2.7
  next           15.1.0  -> 16.2.10
  vue            3.5.13  -> 3.5.39
  @angular/core  19.0.0  -> 22.0.5
  svelte         5.15.0  -> 5.56.4
  typescript     5.7.2   -> 6.0.3
  vite           6.0.0   -> 8.1.3
  express        4.21.2  -> 5.2.1

knownAsOf bumped to 2026-07-04. Golden fixtures updated for the new
baseline values (spec-required consequence of the bump, per the
phase-19/002 release process). The spec runnable example dates are
re-pinned to the new knownAsOf so the acceptance check stays
reproducible.

verify:baseline-age now passes; on-expiry (2027-01-04) passes and
past-expiry (2027-01-05) fails as documented. Doctor 44/44 and CLI
116/116 tests green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jsuvic

jsuvic commented Jul 4, 2026

Copy link
Copy Markdown
Owner Author

Baseline review completed in 51b2640: all 9 pins checked against the live npm registry on 2026-07-04 and bumped (react 19.2.7, react-dom 19.2.7, next 16.2.10, vue 3.5.39, @angular/core 22.0.5, svelte 5.56.4, typescript 6.0.3, vite 8.1.3, express 5.2.1), knownAsOf -> 2026-07-04. verify:baseline-age now passes, so the "gate fires today" heads-up in the PR description is resolved. Golden fixtures and the spec's runnable example dates were updated accordingly; doctor 44/44 and CLI 116/116 green.

Codex review caught a P2: setUTCMonth overflows month-end knownAsOf
dates through shorter target months (2026-08-31 + 6 months became
2027-03-03), letting builds pass after the calendar-month window
ended. Compute the expiry with explicit day clamping instead
(2026-08-31 -> 2027-02-28; leap-year 2027-08-29 -> 2028-02-29).

Boundary behavior for the current baseline is unchanged
(2027-01-04 passes, 2027-01-05 fails).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jsuvic jsuvic merged commit 224a897 into master Jul 4, 2026
2 checks passed
@jsuvic jsuvic deleted the phase-19-baseline-freshness-gate branch July 4, 2026 09:31
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