Skip to content

Commit 6267a29

Browse files
Restore the provider architecture gatekeeper on this branch
`cross provider case clusters are derived or specifically justified` passes on main and failed on this branch. The allowlist pins each guarded construct to an exact line with a text anchor, and earlier commits here inserted lines into UsageStore+Refresh.swift, UsageStore.swift and MenuCardView+ModelHelpers.swift, so 44 entries drifted off their anchors and every orphaned entry then cascaded into an unjustified-construct failure. - Recompute the 44 drifted line numbers against their anchors. - Justify the two Claude constructs in the composition file, which were added with no marker at all. The first reads better hoisted into a named local than as a comment buried in an argument list. - Update the MenuCardView cluster fingerprint: the statusLine note sits between the .kiro and .kilo checks, so the gatekeeper now sees one three-provider cluster where the entry expected two. The maintainer's reason text still describes it accurately and is left alone. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent abcba7c commit 6267a29

2 files changed

Lines changed: 53 additions & 48 deletions

File tree

Sources/CodexBar/UsageStore+ClaudeStatusLineComposition.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@ extension UsageStore {
1212
_ result: ProviderFetchResult,
1313
_ context: ProviderRefreshOutcomeContext) -> UsageSnapshot?
1414
{
15+
// Provider-specific by design: the statusLine feed is a Claude-only source, so every other provider
16+
// must reach the composition helper with no source label and pass straight through it.
17+
let claudeSourceLabel = provider == .claude ? result.sourceLabel : nil
1518
guard let composed = Self.claudeSnapshotComposingStatusLineFeed(
1619
current: scoped,
1720
previous: self.snapshots[provider.instanceID],
18-
sourceLabel: provider == .claude ? result.sourceLabel : nil,
21+
sourceLabel: claudeSourceLabel,
1922
accountIsStable: context.claudeOAuthActiveAccountObservation != .changed,
2023
ownsPreviousRows: self.claudeStatusLineOwnsPreviousRows())
2124
else { return nil }
@@ -71,6 +74,8 @@ extension UsageStore {
7174
/// Records the account behind a stored Claude snapshot. The feed carries no identity, so a snapshot it
7275
/// produced must not become the ownership evidence for the next one.
7376
func recordClaudeSnapshotAccount(provider: UsageProvider, sourceLabel: String?) {
77+
// Provider-specific by design: only Claude has a statusLine feed whose identity-free snapshots must be
78+
// excluded from becoming the ownership evidence for the next composition.
7479
guard provider == .claude, !Self.isClaudeStatusLineSourceLabel(sourceLabel) else { return }
7580
self.claudeSnapshotAccountUuid = ClaudeAccountProfile.accountUuid(
7681
environment: ProcessInfo.processInfo.environment)

0 commit comments

Comments
 (0)