Skip to content

test(agents-md): pin the package version in the per-stack snapshots so releases don't break them - #1056

Merged
admarble merged 1 commit into
mainfrom
fix/agents-md-snapshot-version
Sep 12, 2026
Merged

admarble merged 1 commit into
mainfrom
fix/agents-md-snapshot-version

Conversation

@admarble

@admarble admarble commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Main has been red since the v2.15.0 release commit (a4796c3): the five generateAgentsMd per-stack snapshots recorded the #990 marker as v=2.14.0, and the version bump changed it. The release pre-flight suite ran before the bump, so nothing caught it.

Fix: getPackageVersion is mocked to 0.0.0-test for this file and the snapshots are re-recorded; the diff is the v= field only (0 non-marker lines). The AC-1 marker test still matches the real format with an unpinned regex.

This unblocks #1055, whose CI failed on the same five tests.

🤖 Generated with Claude Code

…o releases don't break them

The AGENTS.md marker embeds the package version (#990 AC-1); the snapshots
recorded v=2.14.0 and the 2.15.0 release commit turned main red (5 mismatches).
getPackageVersion is mocked to a fixed value for this file; the re-recorded
snapshots differ only in the marker's v= field.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_0147heJNRw8wBBujPGMqxDpR
@admarble
admarble merged commit 1c7604d into main Sep 12, 2026
6 checks passed
@admarble
admarble deleted the fix/agents-md-snapshot-version branch September 12, 2026 15:06
admarble added a commit that referenced this pull request Sep 15, 2026
…off the 5s unit test budget (#1063)

Follow-up to the #1062 review, where three unrelated test failures rotated through full-suite runs on main:

- doctor.test.ts: two scenario assertions depended on the live npm registry via checkVersionThorough(), so they failed on the day 2.15.1 was published while the branch still said 2.15.0. The module is now partially mocked (importOriginal + a pinned up-to-date result), the same class of fix as #1056's snapshot pin.
- tui/load.test.ts: the first loadTui() paid the cold Ink/React import (~5 s under load) inside a test with the unit project's 5 s testTimeout. The import is now warmed in beforeAll (60 s hookTimeout); loadTui() sets/restores NODE_ENV on every call, so the restore behaviour each test guards is unchanged.
- version-preflight.docs.test.ts: the one async test did an await import() of the manifest/version-check graph inside its 5 s budget. Hoisted to a static import (precedent: version-preflight.test.ts), paid at collection time.

No tolerance was widened; the unit project keeps its 5 s default.

Claude-Session: https://claude.ai/code/session_01LKP1FKm7sK7PEegt7vWhaJ
Entire-Checkpoint: bd730d3b45a1

Co-authored-by: t <[email protected]>
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