fix: make each workflow meta a literal first statement - #426
Conversation
The workflow runtime reads meta before running the script, so it has to be a plain literal at byte 0. The test also checks the literal against SPEC and TIER_MODELS so the copy cannot drift. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The workflow runtime reads meta before it runs the script, so a meta computed from SPEC below it is not read reliably. Move meta to the top as a plain literal with the values the old expression produced. SPEC is unchanged. Bump plugin 2.9.0 -> 2.9.1. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Tester report (round 1)VERDICT: PASS |
Reviewer report (round 1)VERDICT: APPROVE
|
Resolve the plugin.json version to 2.10.0, above main's 2.9.1 from #426. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Closes #424
Part of batch #423
What
The workflow runtime reads each script's
metaexport before it runs the script, sometahas to be a plain literal and the first statement of the file. Today it is computed fromSPECand sits below theSPECandTIER_MODELSconstants.test:adds.claude/workflows/__tests__/workflow-meta.test.mjs. For every.jsfile in.claude/workflows/it checks that the file starts at byte 0 withexport const meta = {, that the literal holds only quoted strings, keys, braces, brackets and commas, and that it equalsSPECwith each tier resolved throughTIER_MODELS. It fails on today's files.fix:movesmetato a literal at byte 0 intm-review-changes.js,tm-review-codebase.jsandtm-map-codebase.js, copying the values the oldmetaevaluated to.SPECis unchanged and keeps its header comment.plugin.jsongoes 2.9.0 -> 2.9.1 (patch).metais a copy ofSPEC's name, description and phases rather than a read fromSPEC, because three tests evaluateconst SPECalone in an empty vm context. The new sync check fails if the copy drifts.Live run
Lead step, after tester PASS at 1afc284.
.claude/workflows/tm-review-changes.jsby path (scriptPath), unmodified, on the first try. No refusal, no hoisted copy. On main the same call is refused ("export const meta = { name, description, phases }must be the FIRST statement in the script", A/B arm: live ultracode on Opus 5.5 on a replayed merged issue #405 and feat: verify stage in tm-review-changes with spec-format item transforms #419).wf_170be40a-a33, 2026-10-01,args: { base: "origin/main" }. The lead checkout was detached at 1afc284 for the run, and HEAD was checked unchanged afterward.{"findings": []}(the runtime counts these as "empty result"); the seventh raised the three nits the critic dismissed. Confirmed 0, refuted 0, unverified 0, so the verify stage did not fire.token-report.mjsandtoken-prices.jsonfrom PR fix: token report prices Sonnet 5.5 and uses the lead's real output tokens #427's branch (which pricesclaude-sonnet-5-5), run read-only against a scratch config dir holding only this run's 8 transcripts. Subagent output is that script's characters-divided-by-4 estimate and leaves out thinking, so the figure undercounts.duration_ms.Checks
npm test: 477 pass, 0 fail (tester, at 1afc284).node scripts/check-version-bump.mjs origin/main HEAD: exit 0, 2.9.0 -> 2.9.1 (tester).🤖 Generated with Claude Code