Skip to content

Post-close /simplify pass on M01 sources#2

Merged
guysenpai merged 1 commit into
mainfrom
refactor/post-m01-simplify
May 13, 2026
Merged

Post-close /simplify pass on M01 sources#2
guysenpai merged 1 commit into
mainfrom
refactor/post-m01-simplify

Conversation

@guysenpai
Copy link
Copy Markdown
Contributor

Summary

Post-close code-review sweep on the M01 sources, applied as a Cas 3 verbal addendum to the M01 brief (documented in briefs/M01-initial-implementation.md under Acted deviations).

Seven small fixes, no behavior change beyond the minisign trailing-bytes guard becoming effective:

  • minisign(trailing-bytes): fix stale offset reference flagged in M01 closing notes line 269 (sigInfoEndglobalSigEnd). Departs from the verbatim-port "minimal changes" mandate, but fixes a latent bug rather than a behavior — explicitly identified in the brief as a future hardening, applied opportunistically here.
  • cache: drop pointless getZigCacheRestoreKeys wrapper + its test
  • gc: replace 9-case switch with Record<string, number> multiplier lookup
  • gc(dirSize): parallel-stat via Promise.all instead of serial for loop
  • resolve(mach): tighten alias check from includes('mach') to endsWith('-mach')
  • post: drop @actions/github dep (only used for runId, replaced by GITHUB_RUN_ID env var)
  • main: remove redundant usedTarballPath local

dist/ rebuilt to preserve the byte-for-byte parity enforced by lint.yml.

Test plan

  • npm test — 89/89 tests passing locally
  • npm run typecheck — clean
  • npm run lint — clean
  • npm run format:check — clean
  • npm run builddist/index.js + dist/post.js rebuilt
  • CI green on this branch
  • lint.yml dist-reproducibility job confirms dist/ matches a fresh rebuild

🤖 Generated with Claude Code

Seven small fixes after a code-review sweep, documented in the M01
brief's Acted deviations as a post-close Cas 3 verbal addendum.

- minisign(trailing-bytes): fix stale offset reference flagged in
  M01 closing notes (sigInfoEnd -> globalSigEnd) so the trailing-
  bytes guard becomes effective again
- cache: drop pointless getZigCacheRestoreKeys wrapper + test
- gc: replace 9-case switch with Record<string, number> multiplier
  lookup
- gc(dirSize): parallel-stat via Promise.all instead of serial loop
- resolve(mach): tighten alias check (endsWith('-mach') instead of
  includes('mach'))
- post: drop @actions/github dependency in favor of GITHUB_RUN_ID
  env var
- main: remove redundant usedTarballPath local

89/89 tests green; typecheck/lint/prettier clean. dist/ rebuilt to
preserve the byte-for-byte parity enforced by lint.yml.

Refs: briefs/M01-initial-implementation.md (Acted deviations)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@guysenpai guysenpai merged commit b149569 into main May 13, 2026
28 checks passed
@guysenpai guysenpai deleted the refactor/post-m01-simplify branch May 13, 2026 06:22
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