refactor(lifecycle): move branch and PR ownership out of root - #1136
refactor(lifecycle): move branch and PR ownership out of root#1136ScriptedAlchemy wants to merge 15 commits into
Conversation
…plan-reopened' into sol/project-lifecycle-1073
…plan-reopened' into sol/project-lifecycle-1073 # Conflicts: # crates/tracedecay-dashboard-api/src/settings_api.rs # crates/tracedecay/src/config.rs
…plan-reopened' into sol/project-lifecycle-1073
…plan-reopened' into sol/project-lifecycle-1073
…plan-reopened' into sol/project-lifecycle-1073
…plan-reopened' into sol/project-lifecycle-1073
…plan-reopened' into sol/project-lifecycle-1073
|
Codex Review SummaryThis 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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 51d1cacbd1
ℹ️ 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".
| config: project_editable_settings(&project_configuration), | ||
| tracedecay_dir_gitignored: crate::config::is_in_gitignore(&state.project_root), | ||
| pr_autotrack: pr_autotrack_payload(state), | ||
| pr_autotrack: pr_autotrack_payload(state)?, |
There was a problem hiding this comment.
Preflight PR state before committing settings
When pr-autotrack.json is malformed or unreadable, this fallible projection runs only while constructing the response, after each PATCH handler has already committed its configuration mutation. The endpoint therefore returns a configuration-authority error even though the requested setting changed, misleading clients and causing retries to encounter the new revision; read this state before committing or represent PR status as a typed unavailable field in the successful response.
AGENTS.md reference: AGENTS.md:L9-L12
Useful? React with 👍 / 👎.
| Some(&schedulers), | ||
| &branch, | ||
| &lifecycle, | ||
| &PrCommandControlV1::with_cancellation(cancellation.clone()), |
There was a problem hiding this comment.
Preserve the previous branch when cancellation interrupts refresh
When an already-tracked manual branch has advanced, activation first unmounts and deletes its prior worktree and refs before rebuilding them. Passing the shutdown cancellation token here makes that reconstruction interruptible; cancellation after deletion returns before branch publication or metadata rollback, leaving durable branch metadata pointing at artifacts that no longer exist until the operator manually retries. Defer cancellation once replacement becomes destructive, or restore/settle the prior metadata and artifacts on failure.
AGENTS.md reference: AGENTS.md:L180-L183
Useful? React with 👍 / 👎.
| std::mem::take(&mut *owned) | ||
| }; | ||
| while let Some(result) = tasks.join_next().await { | ||
| if let Err(error) = result { |
There was a problem hiding this comment.
Report publication join failures in the shutdown receipt
If an admitted publication task panics or is aborted, join_next() returns Err, but this branch only logs the failure and the method still returns (). Because engine/shutdown.rs registers this method with ShutdownOwner::new, the terminal receipt records the owner as clean despite a failed task and potentially partial branch mutation; return a failure and use a result/status shutdown owner instead.
AGENTS.md reference: AGENTS.md:L141-L143
Useful? React with 👍 / 👎.
Summary
tracedecay-applicationand branch publication intotracedecay-code-index-runtimePart of #1073 and the #707 simplification audit.
Verification