feat(plugins): share Codex hook defaults - #1137
Conversation
c7dd400 to
83ee580
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c7dd400f3f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: phernandez <paul@basicmachines.co>
83ee580 to
9a7c140
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9a7c14075f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: phernandez <paul@basicmachines.co>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4300433968
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: phernandez <paul@basicmachines.co>
Signed-off-by: phernandez <paul@basicmachines.co>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e4a1262ff6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: phernandez <paul@basicmachines.co>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 40e00b2541
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: phernandez <paul@basicmachines.co>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1b3abe607d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: phernandez <paul@basicmachines.co>
Signed-off-by: phernandez <paul@basicmachines.co>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dc4b535e76
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: phernandez <paul@basicmachines.co>
Signed-off-by: phernandez <paul@basicmachines.co>
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Why
Codex lifecycle capture was opt-in and repository-scoped, which made it easy for sessions to run without producing any capture envelopes. Repeating the same defaults in every checkout also made shared Codex configuration awkward and allowed repositories to write into the same checkpoint folder.
What Changed
~/.codex/basic-memory.jsonwith the nearest project.codex/basic-memory.json, with project keys taking precedence.redactKeys/redactPathsso project config cannot weaken global privacy rules.falseopt-out and fail-closed malformed settings.codex/<repo-dir>using the Git top-level directory name.sessionProfile: "coding"and the confirmed repository identity together in the project file when shared defaults are user-scoped.Implementation Details
The hook command owns the merge and default resolution so marketplace hook shims remain logic-free. Defaults are applied before the user and project blocks are merged; an explicit setting at either level wins. Redaction lists are the deliberate exception: valid string entries are deduplicated in user-then-project order and cannot be cleared by an empty project value. If either configured source is malformed, evaluation returns the capture-disabled defaults immediately, so neither envelope capture nor PreCompact checkpoint routing can combine a later route with a missing earlier redaction policy. For user-level setups, repository-scoped coding mode and identity stay together in the project file, while the user file carries only defaults that are safe to share across repositories.
The PEP 723 launchers pin
bd5d145d, the implementation commit containing the final hook behavior and tests. The later pin-only commit keeps that revision reachable as an ancestor; release automation will replace it with the release tag.Testing
Automated
uv run pytest tests/test_codex_plugin_package.py tests/cli/test_hook_command.py -q: 109 passed.just fast-check: passed lint, format, and type checks.just package-check: passed all consolidated package validation suites.Manual
uv run basic-memory hook status --harness codex --project-dir /Users/phernandez/dev/basicmachines/basic-memory-cloudwith a user-levelcaptureEvents: truesetting and no repository capture override: reportedcapture events: onandcapture folder: codex/basic-memory-cloudwhile retaining the project-specific mapping.Risks / Follow-ups