openai / gpt-6-astra / low / low effort preferred over openai / gpt-6-luna / low / low effort · close win.
Primary judge: Sol 6.1, requested Low. Effective provider effort and internal attempts were not verified. A close win is still a scored preference; it does not establish a material defect.
Reviewed public evidence
Task goal
Source-backed audit of CodingUsage. The previous effort-comparison wave did not open the repository and produced no source-verified findings. The attached files are the evidence. Read them. Do not modify files. Do not repeat an evidence-limit disclaimer if the attached sources answer the question.
Answer with file and line citations from the attached sources:
1. Provenance. The menu bar is native Swift. helper/collector.mjs imports [REDACTED: home-relative path] and [REDACTED: home-relative path] and starts their refresh loops. Swift sets OpenCode 2 XDG dirs and does not call provider APIs. Separately verified outside this repo, do not re-derive if you cannot read those files: Claude fetches https://api.anthropic.com/api/oauth/usage; Codex fetches https://chatgpt.com/backend-api/wham/usage; Grok fetches https://cli-chat-proxy.grok.com/v1/billing using the xAI access token already in opencode.db and does not refresh it; Cursor uses Cursor dashboard APIs; OpenRouter fetches https://openrouter.ai/api/v1/credits using OPENROUTER_API_KEY from OpenCode service.json; DeepSeek fetches https://api.deepseek.com/user/balance. Say clearly whether displayed numbers are OpenCode's running process, native clients in this app, or plugin loops hosted by this app that call provider APIs with stored credentials.
2. Shareability verdict for another person. Cite concrete blockers in the attached files: all-or-nothing dynamic import, Node path list, ad-hoc codesign, personal bundle id, missing license, LaunchAgent installer, private plugin paths. Separate "another person who already has these exact local plugins" from "a general Mac app." Do not recommend vendoring secrets or private plugin source, and do not recommend this app refreshing tokens.
3. Security findings supported by the attached code only. Include stdout allowlisting, stderr discard, Codex refresh block, instance lock mode, and whether account labels can pass through. Flag only real issues.
4. Prioritized safe cleanup that stays in this repo, does not change the data source, and does not productize credential ownership. Rank by user impact. Call out whether a missing OpenRouter fetcher fails every provider. No rewrite.
Return a direct OpenCode-or-native answer, a shareability verdict, and a cleanup list another engineer could implement without a product decision.
openai / gpt-6-astra / low / low effort answer
## Direct answer: native UI, app-hosted OpenCode plugin loops
**The menu bar is native Swift/AppKit. The numbers come from installed OpenCode plugins running inside this app’s Node helper—not from OpenCode’s running process or native Swift provider clients.** The app can therefore collect while OpenCode is closed.
- Swift constructs the status item and panel, then launches Node with OpenCode 2’s XDG/config directories. It consumes JSON snapshots rather than calling provider APIs (`Sources/CodingUsage/CodingUsageApp.swift:81–124,328–366,421–437`).
- The collector imports the private local plugins and starts their refresh loops (`helper/collector.mjs:7–14,435–459,493–529,610–621`).
- Codex reset-credit details additionally use the installed plugin client with existing credentials (`helper/collector.mjs:561–588`).
Using the explicitly supplied external verification, those plugin clients call:
| Provider | Source |
|---|---|
| Claude | `https://api.anthropic.com/api/oauth/usage` |
| Codex | `https://chatgpt.com/backend-api/wham/usage` |
| Grok | `https://cli-chat-proxy.grok.com/v1/billing`, using the existing xAI access token in `opencode.db`, without refreshing it |
| Cursor | Cursor dashboard APIs |
| OpenRouter | `https://openrouter.ai/api/v1/credits`, using `OPENROUTER_API_KEY` from OpenCode `service.json` |
| DeepSeek | `https://api.deepseek.com/user/balance` |
These endpoint facts are supplied external findings; the attached source verifies the app’s plugin-hosting integration. Its README also documents service-environment credentials and Grok’s database-token provenance (`README.md:20–24`).
## Shareability verdict
**For someone with these exact local plugins: conditionally usable as a local-build utility. For a general Mac audience: not currently a self-contained distributable app.**
Concrete constraints:
- **Private dependencies:** fixed per-user plugin locations, with required internal module exports (`helper/collector.mjs:7–14,435–459`; `README.md:9–18`).
- **All-or-nothing loading:** one rejected import aborts startup before any refresh loop starts. **A missing OpenRouter fetcher disables every provider**, not merely OpenRouter (`helper/collector.mjs:435–446,480–500`).
- **External Node:** only `/opt/homebrew/bin/node`, `/usr/local/bin/node`, and `/usr/bin/node` are searched; no capability/version check precedes use of `--experimental-strip-types` (`Sources/CodingUsage/CodingUsageApp.swift:332–339,440–444`).
- **Local signing:** build and installer use ad-hoc signing, not a publisher identity/notarization workflow (`scripts/build-app.sh:43–50`; `scripts/install-login-item.sh:21–25`).
- **Personal identity:** `ai.utilityinsights.CodingUsage` is embedded in bundle metadata, notification naming, and LaunchAgent identity (`Support/Info.plist:9–10`; `Sources/CodingUsage/CodingUsageApp.swift:5`; `scripts/install-login-item.sh:5–9`).
- **Installation is a shell-managed LaunchAgent:** it rebuilds, stops the existing app, replaces `[REDACTED: home-relative path]`, and registers login/crash restart behavior (`scripts/install-login-item.sh:12–25,49–70`).
- **No license is supplied in the declared snapshot.** The README describes a private app and provides no licensing grant (`README.md:3,28–45`). File absence has no source line citation; this follows from the supplied file manifest.
The bundle copies this repository’s helper files, not Node or the external plugins (`scripts/build-app.sh:45–48`). Sharing should preserve that dependency boundary; neither secrets nor private plugin source should be bundled.
## Security and privacy findings
**Useful protections**
- Collector mappings select specific usage fields and hash account IDs (`helper/collector.mjs:68–70,95–106,265–291,320–366`).
- The helper suppresses console output and stderr; Swift independently drains and discards stderr (`helper/usage-helper.mjs:30–55`; `Sources/CodingUsage/CodingUsageApp.swift:364–366`).
- Swift supplies a small explicit environment instead of inheriting ambient shell API keys (`Sources/CodingUsage/CodingUsageApp.swift:341–352`).
- Codex refresh-capable sources with missing/invalid expiry or expiry within six minutes trigger cache-only behavior. A 15-second watcher stops the loop and marks `REFRESH_BLOCKED`; reset-detail calls use existing access tokens (`helper/collector.mjs:16,470–478,537–558,561–621`). This is a source-level guard around external plugin behavior, not proof of every internal plugin execution path.
- Instance locking uses nonblocking exclusive `flock`; failure to open the lock prevents helper startup (`Sources/CodingUsage/CodingUsageApp.swift:16–24,33–39,69–74`).
**Actual limitations**
1. **Account labels can reach stdout and the visible UI.** Claude/Codex `account.label` becomes `title` without anonymization, then Swift renders it. The unused-looking `accountLabel` field does not prevent this (`helper/collector.mjs:285–287,360–362`; `Sources/CodingUsage/UsageViews.swift:187–190`). Labels containing email addresses or names can consequently appear in screenshots. Cached Codex labels also expose up to four characters of `labelHint` (`helper/collector.mjs:369–375`).
2. **Stdout filtering is not a complete field allowlist or anonymizer.** Snapshot acceptance checks the envelope and a secret-key/value regex, but permits arbitrary other properties and strings. Error codes are accepted as arbitrary strings, without the snapshot secret scan (`helper/usage-helper.mjs:4–24`). Collector-side projection provides stronger restriction for ordinary output. This supports tightening the boundary—not a claim that credentials currently leak.
3. **The lock is created with mode `0644`, subject to umask.** It is an empty coordination file, not a credential store; world readability alone is not a secret exposure. However, every `flock` failure is classified as “already running,” potentially concealing actual locking errors (`Sources/CodingUsage/CodingUsageApp.swift:33–39`). Distinguish contention from failure.
Ad-hoc signing and external plugin execution are distribution/trust boundaries, not evidence of compromise. The output interception is likewise not a sandbox for malicious plugin code.
## Prioritized safe cleanup
1. **Isolate provider imports and startup failures.** Load each provider independently; keep Codex-specific dependencies together. Emit a fixed provider-local unavailable state when one dependency fails. Preserve the same plugin clients and credential behavior. Add a regression check that missing OpenRouter still permits other providers (`helper/collector.mjs:435–459,480–529`).
2. **Add actionable, sanitized dependency diagnostics.** Distinguish missing Node, unsupported Node capabilities, missing plugin modules, and incompatible exports using fixed codes. Document a verified Node version and offer an explicit executable-path setting. Keep raw stderr suppressed (`Sources/CodingUsage/CodingUsageApp.swift:332–339,440–444`; `helper/usage-helper.mjs:69–78`; `Sources/CodingUsage/UsageViews.swift:40–55`).
3. **Make freshness truthful.** `generatedAt` is snapshot emission time; section `updatedAt` defaults to mapping time and Swift does not decode it. Thus “just now” does not establish a recent provider fetch (`helper/collector.mjs:95–105,415–431`; `Sources/CodingUsage/UsageViews.swift:3–20,137–139`). Label this as snapshot freshness; expose provider/cache timestamps only when supplied by the existing plugins.
4. **Tighten the output schema and label privacy.** Validate allowed keys, enums, bounded strings, and fixed error codes; provide generic account labels for privacy. Keep necessary numeric usage fields and opaque IDs (`helper/usage-helper.mjs:15–24`; `helper/collector.mjs:285–287,360–375`).
5. **Repair small supervisor/lock correctness issues.** Clear partial protocol buffers between helper processes; keep restart-counter mutations on the supervisor queue; distinguish lock contention from other errors. Currently the buffer survives relaunch, and successful decoding resets `restarts` on the main actor rather than the supervisor queue (`Sources/CodingUsage/CodingUsageApp.swift:282–283,328–331,379–418,429–432`).
6. **Make local installation reversible and documented.** Add an uninstall script for the existing LaunchAgent/app, XML-escape interpolated paths, and document replacement behavior. Avoid blanket extended-attribute clearing (`scripts/install-login-item.sh:16–24,27–70`). Document personal identifiers and local-only signing; leave license selection to the owner rather than inventing redistribution permission.
**Next action:** implement provider-isolated loading first. It fixes the largest outage multiplier without changing the data source or taking ownership of token refresh.
Direct, independent review of the supplied snapshot; no files modified.
openai / gpt-6-luna / low / low effort answer
## Provenance
**The menu-bar app is native Swift; the provider numbers come from plugin refresh loops hosted by the app, not from OpenCode’s running process or native client apps.** The README describes a SwiftPM menu-bar app with a bundled Node helper and says Swift never reads credentials or provider APIs directly (README.md:5). Swift launches Node with OpenCode 2’s XDG/config directories (Sources/CodingUsage/CodingUsageApp.swift:336–352). The helper imports local usage plugins and starts their refresh loops (helper/collector.mjs:435–459, 493–529).
Per the supplied external endpoint facts, those loops call Claude, Codex, Grok, Cursor, OpenRouter, and DeepSeek APIs. In particular, the app does **not** ask OpenCode’s running process or native client apps for the displayed live numbers; it hosts plugin loops that call provider APIs using existing stored credentials. Grok’s token is already in `opencode.db` and is not refreshed (README.md:22); OpenRouter credentials are read by the installed V2 loop from OpenCode’s private service environment (README.md:20). The app itself does not implement an OAuth client or write `auth.json` (README.md:20).
## Shareability verdict
- **For someone who already has these exact local plugins:** potentially usable as a personal utility, provided Node and the expected OpenCode 2 paths are present. Those paths are hard-coded or defaulted in the collector (helper/collector.mjs:7–14), and the README lists both plugin dependencies and XDG directories (README.md:9–18). However, loading is all-or-nothing: every import is awaited together and any import failure makes startup report `IMPORT_FAILED` (helper/collector.mjs:435–468, 480–490). A missing OpenRouter fetcher can therefore prevent **every provider** from starting, not just OpenRouter.
- **As a general Mac app:** not share-ready. It requires private, preinstalled plugin paths and local Node; Swift checks only three fixed Node executable locations (Sources/CodingUsage/CodingUsageApp.swift:440–455). The build and installer use ad-hoc signing (scripts/build-app.sh:43–50; scripts/install-login-item.sh:21–25), the bundle ID is personal (`ai.utilityinsights.CodingUsage`, Support/Info.plist:9–10), the README calls it private (README.md:3), and the packet contains no license. The installer also installs a per-user LaunchAgent and configures restart-at-login behavior (README.md:40; scripts/install-login-item.sh:8–9, 27–70).
Do not vendor private plugin source or secrets, and do not make this app responsible for refreshing credentials.
## Security findings supported by the code
- **Stdout is allowlisted by protocol shape and screened for likely secret fields/values.** Only schema-version-1 errors/checks and snapshots without detected secrets pass through (helper/usage-helper.mjs:4–27, 30–44). This is a useful guard, but it is heuristic: it checks selected key names and token-like string patterns, not a formal per-field snapshot schema (lines 4–12, 19–24).
- **Stderr is discarded**, and console logging methods are silenced (helper/usage-helper.mjs:45–55). Swift also drains but does not retain helper stderr (Sources/CodingUsage/CodingUsageApp.swift:353–366).
- **Codex refresh is blocked when a credential may rotate.** The helper stops the Codex loop and displays cached data in that case (helper/collector.mjs:470–478, 595–619; README.md:24). The separate reset-detail fetch is guarded against expired tokens (helper/collector.mjs:560–594).
- **Instance lock:** the lock file is created with mode `0644`, then protected using `flock` (Sources/CodingUsage/CodingUsageApp.swift:33–40). The lock is per-user under `[REDACTED: home-relative path] Support/CodingUsage`. The group/world-readable mode is broader than needed; use `0600` (and consider restricting the directory) to avoid unnecessarily permissive lock-file access. No evidence here shows that the file contains credentials.
- **Account labels can pass through.** Claude and Codex labels are used directly as display titles when nonempty (helper/collector.mjs:284–291, 359–367); Swift’s model accepts and renders the section title (Sources/CodingUsage/UsageViews.swift:12–20, 181–190). The README’s claim that credit and account IDs are not shown is consistent with opaque IDs in section identifiers, but does not mean labels are redacted (helper/collector.mjs:68–70, 285–287, 360–362). Treat labels as potentially identifying data; avoid logging or exporting snapshots.
## Prioritized safe cleanup
1. **Make plugin import failures provider-specific.** The single `Promise.all` for all provider modules prevents every loop from starting if any import—including OpenRouter—fails (helper/collector.mjs:435–459, 480–490). Isolate imports and show an unavailable card only for the affected provider. Keep the same plugins and credential ownership.
2. **Tighten lock-file permissions.** Change the lock creation mode from `0644` to `0600` (Sources/CodingUsage/CodingUsageApp.swift:33–40).
3. **Bound account-label exposure at the display boundary.** Sanitize or length-limit externally supplied Claude/Codex labels before using them as titles (helper/collector.mjs:284–287, 359–367). This is privacy and UI hygiene, not evidence of code execution or a demonstrated exploit.
4. **Improve failure clarity without exposing raw errors.** The app currently maps generic helper errors to broad banners (Sources/CodingUsage/UsageViews.swift:40–55). Add safe, provider-specific import/status diagnostics while continuing to discard raw stderr and secrets.
No rewrite or source/credential productization is needed for these cleanup items.
Primary judge's stated reason
A offers a slightly better implementation order for restoring availability and understanding failures, while more carefully separating harmless lock readability from actual correctness concerns. This is a forced weak preference between substantially equivalent audits, not an established material quality gap. The impact ordering remains judgment-dependent, and an independent review could reasonably reject this preference.
This reason is the judge's assessment. No independent factual-defect finding is asserted by this record.
Battle wave: 4ba7cb49-5416-45bf-8817-98135322db50. Pair: brp1_896933699d5894c050b5fade7411119dc7df857893a5bc4d47aa311683cb13be. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.