Repository navigation
refactor(lib): simplify plugin-options, publish-gate, pydeps and prerequisites shared libs - #15387
Conversation
Hoist the isObject guard to module scope and reuse it for the settings root check, build the managed settings list in one expression, and resolve options into one object read user-first then managed, which gives the same keys, order and precedence as merging two objects. Regenerate the four shared copies and add a patch fragment per carrier. Refs: #14335 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VQb9Q3tnh28AzDYZ8AUjhH
Share one blocking-pattern lookup between the line classifier and the UTF-16LE pass, one hunk-line test between deeperLeak and locateHit, and one visibility reason and source name between the artifact and hosted gates. Build the split-line pass's global regexes once at load instead of on every adjacent-line pair. Regenerate the six shared copies and add a patch fragment per carrier that lacked one. Refs: #14335 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VQb9Q3tnh28AzDYZ8AUjhH
Collapse the two-branch version checks in supported and _runs_supported and the launcher listing's return into conditional expressions, and find the `--` separator once in main instead of four times. Regenerate the three shared copies and add a patch fragment per carrier. Refs: #14335 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VQb9Q3tnh28AzDYZ8AUjhH
Name the repeated "a string matching this pattern" test once and use it across the manifest validation, share the schema-failure message between check, report and probe, and call report directly from main in place of a one-line wrapper. Regenerate the 77 shared copies and add a patch fragment per carrier that lacked one. Refs: #14335 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VQb9Q3tnh28AzDYZ8AUjhH
Restore main's two-object merge in readOperatorOptions. The single shared object let an option key named __proto__ set the result's prototype, which main's object spread dropped, so behavior differed on that key. Both PR reviews flagged it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VQb9Q3tnh28AzDYZ8AUjhH
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Pull request was converted to draft
|
claude-security-review reviewed Security review: PR #15387, head b997c60No security issues found. Scope. I read every hunk in Trusted path:
Other checks.
critical-findings: 0 |
|
claude-review reviewed Code review: no findingsThis PR simplifies four shared lib sources ( Behavior-preservation check (the closing issue's first criterion)
Copies at other paths: Closing issue #14335 criteria
The changelog fragments cover all 77 plugins that carry a changed copy, including every plugin with a changed pydeps, plugin-options or publish-gate copy. No plugin manifests changed. Nothing in the diff adds spend or billing. |
Closes #14335
Summary
Simplifies four shared lib sources from #14335 without changing their behavior:
lib/plugin-options.mjs,lib/publish-gate.mjs,lib/pydeps.pyandlib/prerequisites.mjs.lib/prerequisites.shandlib/prerequisites.ps1are unchanged: each is a short launcher with nothing to simplify, and the PowerShell file is left alone on purpose.Built by hand rather than by the issue lane. The lane's patch was refused at the 262144-byte scan cap because
prerequisites.mjshas 77 regenerated copies underplugins/, so every changed line is multiplied. The hand build was agreed with the hub session.session: Simplify Planning
Fix
scripts/sync-shared-copies.shregenerated the copies in the same commits; each plugin whose copy changed has onebump: patchchangelog fragment ("Internal simplification, no behavior change.").Verification
node --test: prerequisites, check-declared-prerequisites, prerequisites-fleet, git-hooks install, promotion-evidence (96), publish-gate (171) and the publish-gate consumers that load here; all pass. Two consumer suites (callers.test.mjs, report-outcome.test.mjs) could not load locally for missing npm packages (ajv,yaml); CI runs them.prerequisites.test.sh(326),result-gate.test.sh(48), animationinstall-python-deps.test.sh(21),sync-shared-copies.test.sh(96), and the three pydeps suites run directly (23/19/32): all pass.sync-shared-copies.sh --check(767 copies match) and--check-bump origin/main,check-changelog-fragments.sh --check(89 valid),run-ruff.shclean,biome lintno new findings.Related
🤖 Generated with Claude Code
https://claude.ai/code/session_01VQb9Q3tnh28AzDYZ8AUjhH