Skip to content

devlog: record the third Spark projection found during wp2 - #2657

Merged
lidge-jun merged 1 commit into
devfrom
codex/260826-wp2-devlog
Aug 26, 2026
Merged

devlog: record the third Spark projection found during wp2#2657
lidge-jun merged 1 commit into
devfrom
codex/260826-wp2-devlog

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Aug 26, 2026

Copy link
Copy Markdown
Owner

Summary

Documentation correction for the wp2 unit merged in #2649.

020_phase2.md named two server projections carrying the Codex Spark window. The implementation found three: a codexAccountMode: "direct" install reports quota through fetchMainAccountInfoSnapshot (providers/quota.ts:1121), which never touches the Codex Auth DTO — so filtering at quotaForPlan alone left it visible.

It surfaced because tests/provider-quota.test.ts still passed after the first attempt: a test asserting Spark is present, passing when the filter was supposed to have removed it. That is the useful kind of test failure, and worth recording rather than quietly fixing.

The shipped code already handles all three (withSparkVisibility is applied at both quotaForPlan and providerQuotaFromCodexQuota). This makes the doc match what shipped.

Verification

  • bun test tests/codex-spark-visibility.test.ts tests/provider-quota.test.ts tests/codex-auth-api.test.ts tests/repo-hygiene.test.ts — receipt taken, 0 fail
  • Docs-only change; nothing in the build, typecheck, or test path reads from devlog/.

No GUI change, so no screenshot applies.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

Summary by CodeRabbit

  • Bug Fixes
    • Improved quota visibility across account, pooled-provider, and direct-provider views.
    • Ensured Spark quota information is consistently filtered while other custom quota windows remain available.
    • Preserved Spark data during processing and caching to maintain consistent quota behavior across the product.

020_phase2.md named two server projections carrying the Spark window. The
implementation found three: a codexAccountMode "direct" install reports quota
through fetchMainAccountInfoSnapshot, which never touches the Codex Auth DTO,
so filtering at quotaForPlan alone left it visible.

It surfaced because tests/provider-quota.test.ts still PASSED after the first
attempt - a test asserting Spark is present, passing when the filter was
supposed to have removed it.

Recorded so the doc matches what shipped in bf73afe.
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner August 26, 2026 03:51
@github-actions

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 5fb3117b-31a7-4d71-a6e7-f85fbd5dca0c

📥 Commits

Reviewing files that changed from the base of the PR and between bf73afe and a621176.

📒 Files selected for processing (1)
  • devlog/_plan/260826_quota_window_and_backlog/020_phase2.md

📝 Walkthrough

Walkthrough

The suppression plan expands quota visibility coverage to Codex Auth, pooled provider, and direct-mode provider projections. It centralizes filtering in withSparkVisibility and preserves Spark during parsing and caching.

Changes

Quota visibility projections

Layer / File(s) Summary
Centralized quota visibility filtering
devlog/_plan/260826_quota_window_and_backlog/020_phase2.md
The plan applies exported withSparkVisibility at quotaForPlan and providerQuotaFromCodexQuota. It uses the exact Spark label and preserves other custom windows, parsing, and caching behavior.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: ingwannu

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/260826-wp2-devlog

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@lidge-jun
lidge-jun merged commit 37909c6 into dev Aug 26, 2026
16 of 17 checks passed
@lidge-jun
lidge-jun deleted the codex/260826-wp2-devlog branch August 26, 2026 03:52

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a62117623e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +81 to +83
The filter therefore lives in `withSparkVisibility` (exported from `auth-api.ts`) and is
applied at BOTH `quotaForPlan` and `providerQuotaFromCodexQuota`, the latter being the one
point every Codex-sourced provider report funnels through.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Correct the stale single-filter dependency guidance

The new description correctly says direct mode bypasses quotaForPlan and requires filtering again in providerQuotaFromCodexQuota, but the unchanged Dependency section at lines 144–148 still concludes that both surfaces funnel through quotaForPlan, calls it the single filtering point, and requires only two test targets. Anyone implementing or auditing this open work unit from that summary could recreate the direct-mode leak this commit documents; update or remove that conclusion so it names both filter boundaries and the direct-mode regression case.

Useful? React with 👍 / 👎.

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