Repository navigation
Name the absent Infisical service token in the ASC key staging fallback - #367
Merged
Merged
Conversation
* Add release-readiness follow-up edits missing from PR 357 Refs CC-205, AFC-618. Salvaged from the codex-cc-205-release-ready lane: periodStartAt with the explicitStartConfirmsPeriod guard, exact weekly and five-hour label sets, and explicit Infisical service token enforcement in the ship scripts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * release readiness: 5 Kody fixes - calendar-month start advance uses the 28-31d band (ResetAlarmTracker); service-token shape matches the installer st.*.* contract incl legacy 4-segment (shell+mjs agree); INFISICAL_TOKEN no longer passed via env argv (inherited, machine-identity vars env -u stripped); SENTRY_AUTH_TOKEN fallback reachable again; apps.json fixedMarketingVersion read is shape-validated. --------- Co-authored-by: Claude <claude-bot@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: swu-wise[bot] <344778455+swu-wise[bot]@users.noreply.github.com>
…permissions (CC #361 follow-up)
Contributor
This comment has been minimized.
This comment has been minimized.
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
swu-wise Bot
added a commit
that referenced
this pull request
Nov 6, 2026
…at construction from the wire model id, model type and wire label. The display label cannot answer it: the rewrite turns a Hailuo daily into "1d window", so a label-only guard can miss the row and let it take the weekly coding window's bar (Kody review, PR #367). dualWindows now filters on the flag; probe and WidgetTests pin the rewritten-label case.
swu-wise Bot
added a commit
that referenced
this pull request
Nov 7, 2026
…deo off bars (#369) * widgets: supplementary video quota never takes a plan window's bar dualWindows picked the first two visible windows in array order, so MiniMax's supplementary video daily - which the reader itself calls supplementary and discrete - displaced the weekly coding window and the widget showed 1d instead of 7d (owner, 2026-11-06). The pair now comes from the plan's own windows when two are available, via the shared QuotaCapRule.isSupplementaryVideoQuota. Probe and mirrored test pin MiniMax 5h + 7d. * widget probe: keep MiniMax selection check out of the gallery The appended MiniMax platform duplicated the placeholders' MiniMax row in the rendered gallery. It is now a standalone fixture used only by the two dualWindows preconditions, so the gallery input is identical to main and old/new pixel comparisons stay controlled. * Fix WidgetTests FixtureWindow label memberwise init A let with a default value is excluded from Swift's memberwise initializer, so the MiniMax video fixture's label: argument did not compile (QA 2026-11-06). Make it a var with a default, which the memberwise init includes with its default. * Carry the supplementary-video identity on WidgetWindowItem, captured at construction from the wire model id, model type and wire label. The display label cannot answer it: the rewrite turns a Hailuo daily into "1d window", so a label-only guard can miss the row and let it take the weekly coding window's bar (Kody review, PR #367). dualWindows now filters on the flag; probe and WidgetTests pin the rewritten-label case. * Key the widget window dedupe on the allowance identity (cadence + normalized wire label), not cadence alone: Copilot's three monthly buckets collapsed into one 1m row, hiding an exhausted Premium behind a 100% Chat row (QA pixel review). Same-reader fleet/local copies still merge. The MiniMax gallery placeholder is now the decisive edge case (5h + rewritten-label video row + 7d); the probe pins the wire path: video identity captured at parse, Copilot buckets keep three rows. * Reground the dedupe identity on the wire contract, replacing the label key: dedupe on the server's canonical windowKey, normalized across producers by Usage Monitor. QA's actual payload words one MiniMax allowance two ways across producers, so a label key kept duplicate copies; Copilot's buckets carry distinct keys and keep distinct rows. other:unknown falls back to the cadence key. Probe pins the cross-producer merge, fresher-copy win, and Copilot's three rows. * Key the dedupe on the server's series identity from the wire id, not the canonical windowKey: the series (modelId ?? bucketId) is what cross-producer copies of one allowance share, while QA's real payload showed windowKey is not identity - Copilot Chat and Completions both read monthly, and MiniMax's video weekly shares 7d with the plan weekly, so the fresher video copy ate the plan window. dualWindows no longer falls back to a video row. Probe pins the actual collision. * Key the dedupe on the real wire contract, verified against QA's captured payload (committed verbatim in Tests/Fixtures): identity = video class + aliased series + canonical cadence. Video partitions first; bounded MiniMax general/coding-plan aliasing joins cross-producer copies; Copilot buckets keep rows; cadence keeps 5h/daily/weekly separate. Probe drives parseSnapshot with the actual fixture at a fixed now. * Merge the two producer copies of xAI's one subscription credit pool: alias series grok:subscription (codecaps local reader id local-mac:grok:subscription) to the collector's bucketId xai:subscription, bounded to that pool per the producer contract (UnifiedSubscriptionPool already unifies the pair; subscription-quota-parsers.mjs emits xai:subscription). Adds the verbatim qa4 wire fixture and a probe section asserting one 7d 79% row with the fresher phone copy winning. * Exclude supplementary video quota from plan cap state and headline (Sentry review): an exhausted video pool sits beside the subscription and never caps it - atCapWindow and buildPlatformItem now skip video rows the way the phone's QuotaCapRule binding and dualWindows already do. The WidgetTests dualWindows helper now mirrors production exactly (nil when fewer than two plan windows, no pool fallback). Probe asserts the real fixture's plan is not capped. * Ground the video-only fallback and add executable cap-state cases (QA request): atCapWindow keeps a video-only platform's own cap state via the all-window fallback instead of never reporting cap; the probe exercises three constructed platform-level cases - spent video + live plan (no cap), spent plan + live video (plan caps), video-only (fallback binds the video window). * Fix the two focus-small defects QA's pixels showed: controllingWindow now picks from the plan's own windows on every pick (video-only platforms keep theirs), so a spent video pool no longer headlines the gauge beside a plan with headroom; PlanAtCapRow's 'At Cap' label can no longer wrap one letter per line - lineLimit(1).fixedSize, the truncating title yields. Probe gains the two pick assertions beside the cap-state cases. * Adopt QA's qa6 wire regression harness: committed verbatim under qa6-harness/ (probe + three actual wire payloads). WidgetUIProbe now runs the same A/B/C discriminating cases through the real parseSnapshot path - spent video never caps, headlines, or wins the gauge pick over a live plan; a spent plan window caps itself; a video-only platform keeps its own cap and pick via the fallback. Behavior regression tests, not source pins. * Fix the probe's qa6 A pick expectation (QA caught it: mostUrgent is the Mac weekly general at 5%, not the 78% phone 5h - assertion was wrong, product behavior correct) and complete the durable harness: QA6CapProbe gains the 4 pick assertions (A mostUrgent=weekly 5%, A mostHeadroom=5h 78%, B mostUrgent=spent 5h 0%, C mostUrgent=video-only video), run-qa6.sh committed so the wire harness is reproducible from the branch. * fix: case-insensitive allowance aliases and a caption window set that matches the headline * test: pin the case-insensitive xai alias * widget: canonicalise cadence leg of allowance identity into the wire windowKey namespace, so pre-windowKey copies merge with keyed copies (kody CC-210; same fix as companion model in #370) * widget tests: source assertions pinning the canonical wire-cadence helper and the 7d mapping (kody CC-210; mirrors companion model assertions in #370) --------- Co-authored-by: swu-wise[bot] <344778455+swu-wise[bot]@users.noreply.github.com>
Main has landed the reviewed ports of this lineage (reset-alarm rules, widget pairing and dedupe, Kimi and z.ai readers and marks, companion honesty, scoped Infisical service tokens). Conflicts resolve to main's refined implementations; this branch's unique contributions that main lacks are kept: the optional-quota-reader toggles in Settings (with main's Theme.success), and the muse-extra primary computation in WidgetPlatformDisplay.percent (now over main's scoped-allowance filter). install-release-secrets-tooling.sh is dropped, following main's deletion; the workflows use the composite infisical-secrets action.
- LocalQuotaReaderRegistry.read now drops a QuotaWindow a later reader already surfaced, so grok-bot and gbu cannot publish one row twice (regression: testIdenticalWindowsFromTwoReadersArePublishedOnce). - Reading.allowanceKey prefixes the bare-cadence fallback with the provider key, so two providers' weekly windows never collapse into one grouping bucket (regression: testBareCadenceAllowanceKeyIsProviderPrefixed). - Model-detail classification (Reading.detailName and QuotaCapRule.isSubModelLimit) matches exact tokens instead of substrings, so Fable-era, Fabled and Argonaut are not classified as the Fable or Argon limit (regression: testFableDetectionIsExactTokenNotSubstring). - SMSCredentialAccess.live resolves the Twilio API key secret from the environment first, then the Infisical project, with the Keychain setup record last, so the Keychain is no longer the source of truth for an ordinary service credential (regression: testSecretResolutionOrderIsEnvironmentThenInfisicalThenKeychain). - WidgetWindowItem carries its per-model-detail identity from the wire fields, WidgetPlatformItem exposes primaryWindows and detailWindows, and the Antigravity pool publishes Argon beside the pool rows; the native widget probe and the widget detail views compile against real members again. - The explicit period-start guard now refuses a non-advancing period instead of confirming it (merged in cdcc3f7).
A wire row the pool consolidation already published must not be appended a second time as a model detail (Kody review, PR #367).
jaywedgeworth22
enabled auto-merge (squash)
November 8, 2026 05:24
The service-token guard answers before the reader seam runs unless the probe sets a token, so the error named the absent token instead of the reference.
The main-merge kept a stale apps.json against main�s 1.0.N train and ship-workflow pins.
Main took the pre-squash release sources in #357, so ten files conflicted. Took main's version of each, then re-applied this branch's unique work on top: the reset-alarm whole-multiple rule, the Kody review fixes (SMS cancellation, exact window labels, model-detail windows, caption rows) and the Antigravity dedupe. The supplementary-video widget pairing already exists in main's dualWindows, so it was not re-applied. Co-Authored-By: Claude <noreply@anthropic.com>
Closed
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.
Follow-up to #361 (merged as e442df4): the open Kody finding on
scripts/stage-asc-key.mjs:182.Refs #361
Summary
This PR names the absent Infisical read service token in the ASC key staging fallback instead of reporting it as a missing credential or a vault-permissions fault. The staging script now distinguishes “no explicit service token configured” from an empty value and from an unresolved Infisical reference, so the failure points operators at the missing
INFISICAL_TOKENconfiguration. The CI Infisical path moves from universal-auth client credentials to a scoped service token passed directly to the fleet reader, and the release workflows, composite action, docs, and contract tests are updated to match.Key Changes
scripts/stage-asc-key.mjsreturns a distinct missing-service-token signal when no explicit service token is available.checkCredentialreports that the token is not set, explicitly avoiding a misleading “missing credential” or “read permissions” message.fleetSecretsGetrequires anst.-shaped service token and passes a minimal environment tofleet-secrets, preventing implicit machine-identity fallback.scripts/install-release-secrets-tooling.shnow configures the supplied token, proves the reader’s/ascread scope, scrubs the token from diagnostics, and no longer mints a universal-auth access token..github/actions/infisical-secrets/action.yml,ios-ship.yml, andmac-release.ymlreplace client ID/secret inputs withservice-tokenandINFISICAL_CODECAPS_CI_READ_SERVICE_TOKEN. Error messages now refer to the scoped/ascread service token.docs/CI-INFISICAL-SERVICE-TOKENS.mdand updateddocs/AUTO-UPDATE.md,INFISICAL.md, and related tests. The tests cover absent-token naming, service-token passthrough, token redaction, and rejection of machine-identity fallback.Broader Changes In The Branch
docs/rollouts/2026-11-03-cc205-monitoring-alert-controls.md, updates provider-mark documentation, and expands tests for the new behavior.Verification And Risks
The added rollout note records that
swift buildpassed andswift testexecuted 1,563 tests with 10 skipped and zero failures; it also records 79 automation contract tests passing. These results are reported in the added document, not re-run for this description. The same note says no live SMS was sent during development or automated testing and that no iOS simulator was used. It also states that replacement token binding and workflow publication must be verified before release.Automated Review Findings To Resolve
The automated review reported 6 findings: one critical, three high, and two medium. These are reported findings, not verified conclusions.
Sources/CodeCaps/SMSAlertController.swift:13— Twilio API secret is read only from Keychain, not env-first then Infisical.ios/CodeCapsCompanion/App/Models/CompanionQuotaModel.swift:2349— Argon limit rows are selected by substring instead of exact match.ios/CodeCapsCompanion/App/Views/CompanionContentView.swift:1132— Z.ai mark is listed as monochrome without a shipped asset or CI test.ios/CodeCapsCompanion/Widgets/WidgetPresentation.swift:1026— Argon detail windows are appended without de-duping against existing child windows.Tests/Fixtures/WidgetUIProbe.swift:38— MiniMax probe expects 3 windows but the video row is filtered out.ios/CodeCapsCompanion/Widgets/WidgetPresentation.swift:369—dualWindowsmatches the rewritten display label, so the video guard never fires.Summary
Adds and sharpens test coverage for
ResetAlarmTrackeraround "wait-for-usage" providers — quota windows that only advance once usage resumes — and clarifies an existing missed-periods test. The visible diff touches onlyTests/QuotaCoreTests/ResetAlarmTrackerTests.swift; no production source changes are included in the provided patch.Changes
testAWakeAfterThreeMissedWeeksAlerts: the inputs are now built with an explicitreading("7d", period: 7 * day, resetAt:…, observedAt:…)value instead ofcourtesyWindow(…), so the scenario unambiguously states that the reported end advanced by exactly three whole periods while the Mac was asleep. The assertion is unchanged: one alert.testAWaitForUsageProviderSilentThroughTheGapDoesNotAlert(new): a provider shape where the window waits for usage. The Mac sleeps through roughly two periods, but the vendor's end does not move and remaining quota stays at 40. The test asserts no events fire, encoding that elapsed cadence alone is not a reset.testAWaitForUsageProviderRestoreAlertsOnceNotTwice(new): the same long sleep, but remaining quota returns to 100 while the end stays put. The test asserts exactly one event, i.e. the existing restore-shape rule reports it and the missed-periods rule does not double-report.Test evidence
These are tests added or adjusted in this change; the patch contains no record of them being executed, and no runtime verification is reported.
Open review finding
ResetAlarmTrackerTests.swift:1111: the reviewer reports that the new wait-for-usage silent-gap test still feeds its input throughcourtesyWindow, which injects a rolling weekly window rather than an unmoved end. If so, the test may not exercise the "end has not moved" condition it names, and the intended no-alert guarantee remains unverified. This finding is unresolved in the provided material.