Skip to content

fix(calm): pass Claude Code 2.1.331 strict validation - #332

Merged
sKeLe100 merged 1 commit into
mainfrom
fm/claude-331-calm-mod
Nov 24, 2026
Merged

sKeLe100 merged 1 commit into
mainfrom
fm/claude-331-calm-mod

Conversation

@sKeLe100

Copy link
Copy Markdown
Owner

Intent

Fix on main first. The calm mod fails strict validation under Claude Code 2.1.331: tests/fm-calm-claude-mod-plugin.test.sh fails on main 440e286 and on PR 322 (#322), on both hosts. Fix it as its own small PR on main so PR 322 can take it; no waiver of the failing test.

What Changed

  • Dropped the explicit .ts extension from relative import and re-export specifiers in the firstmate-calm mod's hooks/register.ts and lib/ modules (fm-branch-notes, fm-calm-presentation, fm-calm-ship-raster). Claude Code 2.1.331's strict validator rejects them.
  • Made the same specifier change in the mod's test files (branch-notes, calm, working-ship) and tests/support.ts.
  • In tests/fm-calm-claude-mod.test.sh, run_node now preloads a small registerHooks resolver. It retries extensionless relative specifiers with .ts, so the test's own node processes still resolve the mod's modules.

Risk Assessment

✅ Low: The change drops .ts import extensions in the mod, updates test fixtures to match the new Claude Code prop shapes, and adds a test-only Node resolver hook. No intent requirement is contradicted, and no .ts relative imports remain in the mod.

Testing

The baseline test command passed. I then ran tests/fm-calm-claude-mod-plugin.test.sh against the real Claude Code 2.1.331 CLI. Both of its checks passed: strict validation of the mod at its folder and auto-load path, and the mod's own plugin test suites. I did not re-run the test on main to reproduce the original failure. The test was reported failing on main in the intent.

  • Live validation: ✅ go - 2 of 2 scenarios driven live against the product
Scenario Result Live Evidence
Claude Code 2.1.331 strictly validates the Calm mod at its folder and auto-load path ✅ pass live calm-test.log first 'ok' line, rc=0
Calm mod plugin test suites run clean under 2.1.331 ✅ pass live calm-test.log second 'ok' line, rc=0
Evidence: calm test log

Source: calm test log

ok - Claude Code 2.1.331 (Claude Code) validates the Calm mod strictly at its folder and its auto-load path, hooking exactly the working row, tool, user, and assistant drawings and /calm, and logging supervision notes
ok - Claude Code 2.1.331 (Claude Code) runs the Calm mod's plugin test suites clean: persisted toggle, hidden rows, working notes, the clock-driven working ship, and supervision notes

Pipeline

Updates from git push no-mistakes

✅ **Intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 2 of 2 scenarios driven live against the product
Scenario Result Live Evidence
Claude Code 2.1.331 strictly validates the Calm mod at its folder and auto-load path ✅ pass live calm-test.log first 'ok' line, rc=0
Calm mod plugin test suites run clean under 2.1.331 ✅ pass live calm-test.log second 'ok' line, rc=0
  • bin/fm-test-run.sh --changed --exclude-family real-herdr-gated --exclude-quarantined --pc02-if-idle
  • bash tests/fm-calm-claude-mod-plugin.test.sh (real claude 2.1.331 strict validation + mod test suites), exit 0
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

The 2.1.331 validator now type-checks the mod's modules with
allowImportingTsExtensions off, requires the Spinner suffix and
UserMessage isExpanded render props, adds isLink to FsStat, and widens
the ui.blit event to a cells-or-source union. Drop the .ts import
extensions, update the fixture shapes, and teach the portable test's
node runs to resolve the extensionless imports.
@sKeLe100
sKeLe100 merged commit 5feeadb into main Nov 24, 2026
25 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