Skip to content

Phone + widget intake: match plan-metadata marker inside JSON-shaped producer ids - #388

Merged
swu-wise[bot] merged 6 commits into
mainfrom
wise/metadata-id-parity
Nov 9, 2026
Merged

swu-wise[bot] merged 6 commits into
mainfrom
wise/metadata-id-parity

Conversation

@jaywedgeworth22

@jaywedgeworth22 jaywedgeworth22 commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Summary

Phone and widget intake now drop producer ids containing the plan-metadata marker anywhere in the id, rather than only ids ending in the bare token. This brings phone parity with the widget contract from PR #387 for JSON-shaped ids that end in "] and prevents a plan-metadata caption from occupying a quota window/bar slot beside the plan's own meters. No change to own-device survival, dead-copy tracking, or extra-allowance handling was intended.

Changes

  • CompanionQuotaModel: extracted phone wire-intake filtering from buildPlatformSection into testable admitsToIntake, and changed the metadata check from suffix match to substring match. WireRawWindow was widened from private to internal to allow mirrored contract tests to feed wire rows directly.
  • WidgetPresentation: changed the widget intake guard from suffix match to substring match for the same JSON-shaped ids, preserving the existing plan details / reading-less exclusions noted from PR Name the absent Infisical service token in the ASC key staging fallback #367.
  • WidgetParseContractTests: added testPhoneIntakeDropsJsonMetadataIds covering a coding-plan window admitted alongside a JSON-shaped plan-metadata row with reset date, expecting only the coding-plan id to be admitted.

Tests

Test added, not test run reported in the diff. Runtime verification remains unverified.

Automated review — unresolved

Code review reported 2 findings as data, with resolution unverified: medium — shared quota gate handling of non-suffix plan-metadata ids in CompanionQuotaModel.swift; low — potentially redundant plan-metadata guard after intake filtering in WidgetPresentation.swift.

@kody-ai

kody-ai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Code Review Completed! 🔥

The code review was successfully completed based on your current configurations.

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Validate Business Logic: Ask Kody to validate your code against business rules by adding a comment with the @kody -v business-logic command.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ✅

Access your configuration settings here.

​

@swu-wise

swu-wise Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

@kody start-review

@swu-wise
swu-wise Bot merged commit 9eae0c0 into main Nov 9, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant