Fix OMO hook CLIs missing from marketplace snapshot#44
Closed
simoncrypta wants to merge 1 commit into
Closed
Conversation
Author
|
OMO did all that by itself; I didn't. even ask for it... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem Situation
Codex installs the OMO aggregate plugin with lifecycle hooks that execute components/*/dist/cli.js, but the marketplace snapshot did not contain those built CLI files. On a fresh session/prompt Codex tried to run missing files such as components/rules/dist/cli.js and Node exited with MODULE_NOT_FOUND, producing two SessionStart hook failures and three UserPromptSubmit hook failures.
Reproduction Logs
Before the fix: node --test plugins/omo/test/aggregate-hooks.test.mjs failed in #given aggregate hook commands #when installed from the marketplace snapshot #then every referenced local CLI exists with missing targets including components/rules/dist/cli.js, components/telemetry/dist/cli.js, components/ultrawork/dist/cli.js, and components/ulw-loop/dist/cli.js.
Approach
Track the generated component dist outputs in the marketplace snapshot, add a regression test that follows aggregate hook commands to their local CLI targets, and make the aggregate build tolerate source-only sync packages that are absent in this repo. The LSP hook now lazy-loads its optional backend so the hook CLI can build and no-op instead of crashing when lsp-tools-mcp is unavailable.
Why I Am Confident
The new regression fails before the dist files exist and passes after the fix. The exact SessionStart/UserPromptSubmit hook commands that failed locally now execute from the marketplace tree with exit code 0.
Risks
Moderate size increase from committing generated dist files. Runtime behavior risk is low because the hook command paths now match files in the snapshot; LSP diagnostics become unavailable rather than crashing when the optional backend package is absent.
User-Visible Behavior Changes
Codex sessions with OMO plugin hooks enabled no longer show lifecycle hook exited with code 1 solely because the hook CLI file is missing.
Verification
This PR was debugged, implemented, and created with LazyCodex.
Tag: lazycodex-generated
Summary by cubic
Fixes missing OMO hook CLIs in the marketplace snapshot by committing built
distartifacts and updating ignore rules. Codex can now run Rules, LSP, Git Bash, and Comment Checker hooks without MODULE_NOT_FOUND errors on fresh installs.plugins/omo/components/*/dist/**in the repo and component.gitignoreto include built CLIs in snapshots.dist/cli.jsexists and runs.@code-yeongyu/lsp-tools-mcp; if unavailable, diagnostics are skipped (no crash).rules,lsp,git-bash, andcomment-checkercomponents.Written for commit d772961. Summary will update on new commits.