feat(core): select Project Profiles at runtime - #72
Merged
Conversation
siracusa5
force-pushed
the
codex/project-profiles-runtime-selection
branch
from
July 29, 2026 06:40
fa91a82 to
421d3d1
Compare
Signed-off-by: John Siracusa <siracusa5@users.noreply.github.com>
runProfilePromotion held the shared manifest lock for the entire approve step, including the git push at the end. The manifest lock times out after 15s (MANIFEST_LOCK_TIMEOUT_MS), but a push can take much longer (retry-with-rebase against a 90s per-call git timeout) — so a slow or retried push could make every other profile-aware operation sharing that manifest (a concurrent capture confirm, another promotion, a profile-cli edit) fail with a spurious "Timed out acquiring the ContextCake manifest lock" error. confirmCapture already avoids this by releasing the lock before pushing; promotion's own adversarial-review notes (B10) describe the same "selection through local mutation" boundary but the implementation held the lock through the push too. Split approvePromotion into commitPromotion (validate, write curated concept, commit the live deletion — stays inside the lock) and finalizePromotion (push + review/binding cleanup — runs after the lock is released), matching the documented design. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: John Siracusa <siracusa5@users.noreply.github.com>
siracusa5
force-pushed
the
codex/project-profiles-runtime-selection
branch
from
July 29, 2026 07:08
02f593b to
af1f222
Compare
1 task
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.
Summary
contextcake profile current/list/create/map/unmap/deletewith locked migration and reference-only deletionactiveProfilelocal-only and return synced display labels as structured MCP metadata rather than instruction proseAcceptance evidence
--profilewins over cwd; deepest canonical project mapping wins; unmatched cwd usesdefault--legacy-pathscompatibility remain greenAdversarial review
Two independent attack passes found and drove fixes for unsafe batch destinations, symlink side effects, self-authored promotion bindings, revalidation races, destructive failure ordering, push retry/crash recovery, synced-label prompt injection, and foreign-child shutdown. Both reviewers completed a final closure audit with no residual blockers. The review record and resulting spec amendment are included in this PR.
Test plan
npm testnpm --prefix apps/desktop test— 34 testsnpm --prefix apps/console run typechecknpm --prefix apps/site run build— 28 pages + install verificationgit diff --checkNotes
This is Project Profiles PR2 of 5, following Manifest v2 trust-boundary PR #70. The engine service/profile-scoped configuration API remains intentionally deferred to PR3; the desktop/Console management UI remains PR4.