Publish stable status item identity before callbacks - #3204
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs real behavior proof before merge. Reviewed August 26, 2026, 2:34 AM ET / 06:34 UTC. ClawSweeper reviewWhat this changesThis PR assigns CodexBar’s stable menu-bar autosave identity before invoking the status-item creation callback and adds a regression test for that ordering. Regression provenancePossible regression — suspected (reproduction). No predecessor PR is attributed. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 3 items remain The patch is a focused ordering fix but still lacks real after-fix evidence that Bartender retains saved placement across relaunch, so it should remain open for proof. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — execution before step 1 Assertions:
How this fits togetherCodexBar creates macOS status items for its menu-bar interface, then runs creation callbacks to register provider items and continue setup. The autosave name is an identity that menu-bar managers can use to retain item placement across relaunches. flowchart LR
A[App startup] --> B[Create status item]
B --> C[Assign stable identity]
C --> D[Creation callback]
D --> E[Register item and attach menus]
E --> F[Menu-bar manager placement]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Attach redacted before/after Bartender relaunch evidence from a freshly built bundle, showing the same saved item placement is reused after restart. Do we have a high-confidence way to reproduce the issue? No; the linked report provides a concrete Bartender relaunch path and source proves the ordering, but no after-fix Bartender run confirms the external persistence outcome. Is this the best way to solve the issue? Unclear; assigning the stable name first is a narrow maintainable repair, but a real manager relaunch is needed to show that it solves the identity churn. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against dfc176cdf945. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
steipete
left a comment
There was a problem hiding this comment.
Reviewed head 7dcbe03. This does not yet fix the production path reported in #3201.
Both real creation sites for the merged status item (startup and recovery in StatusItemController.swift) omit onCreated. Moving an optional callback across the autosaveName assignment therefore leaves the observable creation sequence unchanged for codexbar-merged. The new test supplies a merged-item callback that does not exist in either production path, so it proves the proposed helper ordering but not the reported Bartender identity behavior.
The actual callback is used by per-provider vending to register the item immediately after creation, before later setup can reenter vending. That ordering was intentional in a3f017f (#2162); please preserve that registration invariant while finding the real merged-item boundary.
Please revise this around a demonstrated production-path difference, with a regression that follows actual merged startup/recovery and a signed-app Bartender quit/relaunch check showing the same saved item reused. The passing CI is useful, but the current patch should not close #3201.
Closes #3201.
CodexBar currently publishes a newly created status item through
onCreatedwhile AppKit still exposes its transientItem-0autosave name. Bartender can persist that callback-time identity and treat each relaunch as a new item.This assigns the existing
codexbar-*autosave name before the callback runs. The regression test fails on the parent source withItem-0and passes once the stable identity is published first.Tests:
CODEXBAR_SUPPRESS_TEST_KEYCHAIN_ACCESS=1 swift test --filter StatusItemControllerSplitLifecycleTests— 26 passedmake check— passedCODEXBAR_SUPPRESS_TEST_KEYCHAIN_ACCESS=1 make test— not green locally because twoAdaptiveRefreshTimerTestshit their 30-second scheduling timeout; both failures reproduce unchanged on the untouched upstream baseI could not run the closed-source Bartender relaunch check because Bartender is not installed here. Compatibility risk is limited to making the existing stable autosave name observable earlier; the useful review focus is whether any creation callback intentionally depends on AppKit's temporary
Item-*name.