fix: stabilize docs policy and clean-worktree validation#18
Conversation
Remove scoped package literal from v0.1.1 notes so documentation policy tests remain consistent with legacy-only mention rules. Co-authored-by: Codex <noreply@openai.com>
Run config precedence assertions directly against source module exports with explicit env snapshot/restore, so tests pass in clean worktrees without prebuilt dist artifacts. Co-authored-by: Codex <noreply@openai.com>
Add the exact .tmp entry expected by repo-hygiene checks to keep policy validation green. Co-authored-by: Codex <noreply@openai.com>
📝 Walkthroughwalkthroughupdates test execution from subprocess invocation to direct dynamic import and in-process calls, revises release note wording, adds changes
estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes notes for review
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
Upgrade hono to ^4.12.3 to remediate GHSA-xh87-mx6m-69f3 and pin rollup to ^4.59.0 via overrides so audit:ci has no unexpected high/critical findings. Co-authored-by: Codex <noreply@openai.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@package.json`:
- Around line 119-124: Add concise documentation explaining why the "overrides"
section pins "hono" and "rollup": update package.json to include a short comment
or add an entry to the project README/SECURITY/ADR linking to the relevant PR or
advisory that motivated the override, referencing the "overrides" object and the
specific package names "hono" and "rollup" so future maintainers can find the
rationale easily.
ℹ️ Review info
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge base: Disabled due to data retention organization setting
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (1)
package.json
📜 Review details
🔇 Additional comments (2)
package.json (2)
123-124: rollup 4.59.0 is published and stable on npm.the version override approach is solid for suppressing transitive dependency audit findings. pinning via overrides in package.json keeps the resolution explicit without forcing direct dependency changes.
119-119: hono upgrade properly patches ghsa-xh87-mx6m-69f3.the advisory affects hono >= 4.12.0 and < 4.12.2, fixed in 4.12.2. bumping to 4.12.3 resolves it. both dependencies and overrides at ^4.12.3 keeps transitive resolution consistent.
Raise minimatch overrides to patched ranges (^10.2.3 globally and ^9.0.7 for typescript-estree) to remove remaining high-severity dev audit findings while preserving toolchain compatibility. Co-authored-by: Codex <noreply@openai.com>
Add an override for ajv ^6.14.0 to eliminate the remaining moderate dev advisory while staying within eslint's 6.x dependency expectations. Co-authored-by: Codex <noreply@openai.com>
Replace package-name based dev audit exemptions with advisory source-id matching to tighten CI security signal and reduce accidental broad allowlisting. Co-authored-by: Codex <noreply@openai.com>
Document why package.json overrides pin hono and rollup, including advisory context, so future maintainers can trace the security rationale without digging through old PRs. Co-authored-by: Codex <noreply@openai.com>
Fixed items
Deferred items
Blocked items
Validation evidencepm run typecheck - passpm run lint - passpm test - pass (87 files, 2071 tests)pm run audit:ci - pass |
Fixed items
Deferred items
Blocked items
Validation evidence
|
Fixed items
Deferred items
Blocked items
Validation evidencepm run clean:repo:check - passpm run audit:ci - passpm run typecheck - passpm run lint - passpm run build - passpm test - pass (92 files, 2113 tests)
|
Resolves all open Dependabot alerts on package-lock.json: - hono <4.12.14: JSX SSR HTML injection, cookie name bypass, IPv4-mapped IPv6 ipRestriction, setCookie validation, serveStatic repeated-slash bypass, toSSG path traversal (alerts #16, #18, #20, #22, #24, #26) - vite <7.3.2: dev server WebSocket arbitrary file read, optimized deps .map path traversal, server.fs.deny query bypass (alerts #12, #13, #14) Lockfile refreshed via npm install --package-lock-only. Typecheck, lint, and 3418/3418 tests pass.
Resolves all open Dependabot alerts on package-lock.json: - hono <4.12.14: JSX SSR HTML injection, cookie name bypass, IPv4-mapped IPv6 ipRestriction, setCookie validation, serveStatic repeated-slash bypass, toSSG path traversal (alerts #16, #18, #20, #22, #24, #26) - vite <7.3.2: dev server WebSocket arbitrary file read, optimized deps .map path traversal, server.fs.deny query bypass (alerts #12, #13, #14) Lockfile refreshed via npm install --package-lock-only. Typecheck, lint, and 3418/3418 tests pass.
Completes partial fixes flagged in the third review, bumps to v2.2.1. Real bugs (prior fixes were incomplete): - request/fetch-helpers: isUnsupportedCodexModelForChatGpt (the handleErrorResponse path) now also matches NORMALIZED_UNSUPPORTED_MODEL_PATTERN, so a 400 'model not currently available for this chatgpt account' gets the entitlement rewrite, not generic error guidance (#13) - forecast: quota-exhausted accounts are classified 'delayed' (not 'unavailable'), so they slipped the recommendation filter; added an explicit exhausted flag and excluded it, returning null when the whole pool is exhausted (#10) - storage/record-utils: clampIndex guards NaN -> 0 (Math.trunc(NaN) propagated) (#16) - local-client-tokens: debounce lastUsedAt persistence (60s threshold) so the bearer-verify hot path stops writing to disk every request; +chmod 0o700 re-assert on the token-store dir (#12, #11) - mcodex: relay SIGTERM/SIGINT to the spawned child so it isn't orphaned (#15) Test quality: - local-client-tokens: parameterized rename-retry test over ENOTEMPTY/EAGAIN/EACCES (#18) - storage-flagged: clear the H4 deadlock-guard timer on the happy path (#17) - storage: removeWithRetry for suite cleanup (#19) Release: - bump package.json + .codex-plugin/plugin.json to 2.2.1 - add docs/releases/v2.2.1.md; point docs portal + README at it Known follow-ups (documented, deferred — need design, not rushed into a patch): config env-path save is a single-process CAS not a true cross-process lock (#8/#9); verifyLocalClientBearerToken read stays serialized but a fuller lease is future work; runtime proxy routingMutex='enabled' still has a select/commit cursor race (#14) requiring an async refactor of chooseAccount across its call sites. Full suite: 4337 passed, 3 skipped, 0 failed; typecheck + lint clean.
Real bug introduced by the round-3 config lock (#18): - the cross-process config lock fixed expiresAt once and never renewed, and released by unconditionally unlinking the lockfile. A save running longer than CONFIG_LOCK_TTL_MS could be deemed stale and stolen by another process, after which the original holder would delete the NEW owner's lock and reopen concurrent saves. Added a per-acquisition owner token (randomUUID) to the lock payload and a releaseConfigLockIfOwner() that compares-before-unlink, so a holder never deletes a lock it no longer owns. Regressions: stale-foreign-lock takeover (cleans only its own lock) + live-foreign-lock respected (times out, foreign lock untouched, no partial apply). Nits: - mcodex-launcher test: dropped the explicit vitest globals import (#17). - runtime-rotation-proxy: replaced the stale 'KNOWN GAP (L4)' comment on chooseAccount with accurate docs — the race is closed via the reentrant withRoutingMutex on the hot path (#19). Full suite: 4343 passed, 3 skipped, 0 failed; typecheck + lint clean.
Fixed items
pm run clean:repo:check passes from a clean worktree.
ollup override ^4.59.0, eliminating unexpected high/critical audit findings (GHSA-xh87-mx6m-69f3 and dev audit blocker).
Deferred items
Blocked items
Validation evidence
pm run typecheck - pass
pm run lint - pass
pm test - pass (87 files, 2071 tests)
pm run clean:repo:check - pass
pm run audit:prod - pass (0 vulnerabilities)
pm run audit:ci - pass (no unexpected high/critical findings)
pm audit --json - pass (0 vulnerabilities)
pm test -- test/documentation.test.ts - pass
pm test -- test/repo-hygiene.test.ts - pass
note: greptile review for oc-chatgpt-multi-auth. cite files like
lib/foo.ts:123. confirm regression tests + windows concurrency/token redaction coverage.Greptile Summary
stabilized repository hygiene checks and hardened security audit policy.
.tmpto gitignore for clean-worktree validationhonoto^4.12.3and pinnedrollupto^4.59.0to patch high/critical audit findings (authentication bypass and dev dependency vulnerabilities)minimatchandajvoverrides to eliminate remaining moderate/high advisoriesall validation evidence passes per pr description. test refactoring removes hidden dist dependency and properly restores environment state. no windows filesystem or token safety risks introduced.
Confidence Score: 5/5
Important Files Changed
.tmpentry to satisfy clean-worktree checkajv,hono,minimatch,rollupto patch vulnerabilitiesLast reviewed commit: 6828be7