GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(usage-hub): DeepSeek daily balance check + CNY unit in snapshot store · Issue #1052 · developing-today/code

feat(usage-hub): DeepSeek daily balance check + CNY unit in snapshot store #1052

New issue
Copy link
New issue
Copy link
Closed
#2370
Closed
feat(usage-hub): DeepSeek daily balance check + CNY unit in snapshot store#1052
#2370
Copy link
Assignees
dezren39
Labels
meta/follow-upFollow-up spun out of earlier workqueue/blockedQueue or user escalation statestatus/blockedQueue or user escalation stateuser/escalatedRequires a Drew decision or access

Description

@dezren39
dezren39
opened on Oct 27, 2026
Issue body actions

Part of epic #1047. Hub design §2.1 / §5 v2 + a v1 deviation to fix.

  1. DeepSeek balance check: stewardship reads api.deepseek.com balance daily (key in Bitwarden as deepseek.api-key, verified 2026-10-24: CNY 44.64 at that read) and records it as a dated snapshot. DeepSeek direct is the PAYG reserve only — balance display, never a routine route.
  2. CNY unit: the v1 snapshot backfill SKIPPED the DeepSeek balance because the §4 unit enum has no CNY — recording it as USD would corrupt history. Add a proper currency unit (or currency field) to the snapshot schema + extractors, backfill correctly, and add a test.
    Acceptance: balance appears on the PAYG card in ¥ with measured-at; schema change covered by tests; no USD-labelled CNY records in the store.

Activity

Next
  1. dezren39
    added
    meta/follow-upFollow-up spun out of earlier work
    on Oct 27, 2026
  2. developing-today commented on Oct 27, 2026

    @developing-today
    developing-todayBot
    on Oct 27, 2026 – with developing.today
    Contributor
    More actions

    CODE-197

  3. github-actions
    assigned
    dezren39
    on Oct 27, 2026
  4. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    on Oct 29, 2026
  5. dezren39 commented on Oct 29, 2026

    @dezren39
    dezren39
    on Oct 29, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), lane D
    • Session / ID: queue task 2317
    • Found via: queue claim
    • Task: Triage issue feat(usage-hub): DeepSeek daily balance check + CNY unit in snapshot store #1052 — verify the snapshot store still has no CNY unit and no DeepSeek balance record at current main, then route as scoped follow-up or close with evidence
    • Expectation: s — triage verdict backed by code citation at HEAD
    • Links: n/a yet
  6. dezren39 commented on Oct 29, 2026

    @dezren39
    dezren39
    on Oct 29, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done

    • Agent: queue worker (repo-worker-code), lane D
    • Session / ID: queue task 2317
    • Found via: queue claim
    • Task: Triage verdict for feat(usage-hub): DeepSeek daily balance check + CNY unit in snapshot store #1052 — CONFIRMED at current main
    • Expectation: done — verdict below, follow-up routed

    Verdict: CONFIRMED — the snapshot store still cannot represent CNY at HEAD a3cdf6c9a35df1ff8b88b7a02d62e5c04ca4c94a, so the DeepSeek balance still has no snapshot record and no card value. Two files at HEAD defer this exact work to this issue by name.

    Evidence (fresh reads of current main, not the issue text):

    • pm-stack/aggregator/src/snapshots.ts — the store's validation set is UNITS = {pct, usd, count, gb, tokens, usd-est}; isSnapshotRecord rejects anything else, so a CNY record is malformed by definition. pm-stack/aggregator/src/model.ts (~line 1262) types SnapshotRecord.unit with the same six values.
    • pm-stack/aggregator/scripts/backfill-usage-snapshots.ts header, verbatim: "The DeepSeek balance (¥44.63) is deliberately NOT backfilled: the §4 unit enum (pct|usd|count|gb|tokens) has no CNY, and recording it as USD would corrupt history." — the v1 deviation this issue names, still in place.
    • pm-stack/aggregator/src/quota-gather-map.ts, recordsFromEntries: "Label-only windows (balances) yield no record in v1 — the CNY balance case is feat(usage-hub): DeepSeek daily balance check + CNY unit in snapshot store #1052's unit work; quota-current still carries the label." — the gatherer knowingly emits no DeepSeek balance record.
    • pm-stack/aggregator/src/snapshot-records.ts — UNIT_MAP has no CNY mapping and unmapped units are silently skipped (if (!unit) continue).

    Routing: follow-up enqueued as queue task 2987 (small_fix, dedupe repo-health:v1:fix:developing-today/code:issue:1052, packet queue-packets/packet-1052-fix.json), with the design pinned: cny as a first-class unit value end-to-end (model type, store validation, extractor mapping — no currency-field redesign, and no CNY→USD conversion anywhere), a recordsFromEntries writer for the moved DeepSeek balance label, the backfill extended to include the skipped balance observations at their original dates (resolving the ¥44.63/¥44.64 discrepancy from the script's dated source line, never by inventing a value), ¥ rendering with measured-at on the PAYG card, and a guard test that no DeepSeek balance record exists with unit usd. This issue stays open and is labelled queue/queued for that task.

  7. dezren39
    added
    queue/queuedHas a queued queue task
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    queue/queuedHas a queued queue task
    on Oct 29, 2026
  8. 50 remaining items

  9. dezren39
    added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/claimedQueue worker lifecycle state
    on Oct 29, 2026
  10. dezren39 commented on Oct 29, 2026

    @dezren39
    dezren39
    on Oct 29, 2026
    MemberAuthor
    More actions

    🤖 Agent note · parked

    • Agent: queue worker (repo-worker-code), Lane D shift
    • Session / ID: queue task 2987 (small_fix, resume)
    • Found via: queue claim
    • Task: Resume check on PR feat(usage-hub): add cny snapshot unit end-to-end + DeepSeek balance (#1052) #2370: still OPEN/CLEAN, head b68ba88, checks complete (SUCCESS/SKIPPED/NEUTRAL). But the resume conditions are unmet: main is still 5a34fa7 (unmoved since 10:57Z — the merge-queue stall in ci: merge queue ejects every PR — no merge since #2233 (10:57Z), entries dropped 2-6 min into AWAITING_CHECKS #2403 continues), and the Codex round on b68ba88 is still 'running' with zero findings posted (stuck since 15:46Z).
    • Expectation: parked 20 min. Resume: when main moves past 5a34fa7, disposition the Codex round, re-enqueue PR feat(usage-hub): add cny snapshot unit end-to-end + DeepSeek balance (#1052) #2370, and on merge complete task 2987 and close this issue.
  11. dezren39 commented on Oct 29, 2026

    @dezren39
    dezren39
    on Oct 29, 2026
    MemberAuthor
    More actions

    🤖 Agent note · parked

    • Agent: queue worker (repo-worker-code), lane B shift
    • Session / ID: queue task 2987
    • Found via: queue claim (resume from verified)
    • Task: Resume conditions re-checked fresh at 2026-10-29T20:38Z and still unmet: (1) main is still 5a34fa70 — the merge-queue stall ci: merge queue ejects every PR — no merge since #2233 (10:57Z), entries dropped 2-6 min into AWAITING_CHECKS #2403 is live, proven this same shift when PR mcpx: close #1951 remainder — stale dialect-gap rows + structuredContent warn-only policy doc #2190's queue entry was ejected ~2 min after enqueue at position 1; (2) the Codex review round on PR feat(usage-hub): add cny snapshot unit end-to-end + DeepSeek balance (#1052) #2370 head b68ba887 still reports status running (since 15:46Z) with zero findings posted — there is nothing to disposition yet. PR feat(usage-hub): add cny snapshot unit end-to-end + DeepSeek balance (#1052) #2370 itself remains OPEN / CLEAN / MERGEABLE with checks complete.
    • Expectation: Resume when main moves past 5a34fa70 (ci: merge queue ejects every PR — no merge since #2233 (10:57Z), entries dropped 2-6 min into AWAITING_CHECKS #2403 clears): disposition the Codex round on b68ba887, re-enqueue PR feat(usage-hub): add cny snapshot unit end-to-end + DeepSeek balance (#1052) #2370, and on merge complete as fixed_merged and close feat(usage-hub): DeepSeek daily balance check + CNY unit in snapshot store #1052.
    • Links: PR feat(usage-hub): add cny snapshot unit end-to-end + DeepSeek balance (#1052) #2370 · branch queue/2987-1052-cny-snapshot-unit · blocker ci: merge queue ejects every PR — no merge since #2233 (10:57Z), entries dropped 2-6 min into AWAITING_CHECKS #2403
  12. dezren39 commented on Oct 29, 2026

    @dezren39
    dezren39
    on Oct 29, 2026
    MemberAuthor
    More actions

    🤖 Agent note · parked

    • Agent: queue worker (repo-worker-code), lane B shift
    • Session / ID: queue task 2987 (second claim this shift)
    • Found via: queue claim — the 20-minute park from my earlier claim this shift expired and the task recirculated unchanged (main still 5a34fa70 at 20:58Z; Codex round on PR feat(usage-hub): add cny snapshot unit end-to-end + DeepSeek balance (#1052) #2370 head b68ba887 still running with 0 findings).
    • Task: Re-parking with a 1-hour delay so the task stops recirculating while ci: merge queue ejects every PR — no merge since #2233 (10:57Z), entries dropped 2-6 min into AWAITING_CHECKS #2403 persists; resume condition unchanged.
    • Expectation: Resume when main moves past 5a34fa70: disposition the Codex round, re-enqueue PR feat(usage-hub): add cny snapshot unit end-to-end + DeepSeek balance (#1052) #2370, merge, close feat(usage-hub): DeepSeek daily balance check + CNY unit in snapshot store #1052.
    • Links: PR feat(usage-hub): add cny snapshot unit end-to-end + DeepSeek balance (#1052) #2370 · blocker ci: merge queue ejects every PR — no merge since #2233 (10:57Z), entries dropped 2-6 min into AWAITING_CHECKS #2403
  13. dezren39
    added
    queue/blockedQueue or user escalation state
    status/blockedQueue or user escalation state
    user/escalatedRequires a Drew decision or access
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    work/assignedQueue worker lifecycle state
    on Oct 29, 2026
  14. dezren39 commented on Oct 29, 2026

    @dezren39
    dezren39
    on Oct 29, 2026
    MemberAuthor
    More actions

    🤖 Agent note · CNY unit work implemented and verified; blocked only on the repo-wide merge-queue freeze (#2403)

    • Agent: queue worker repo-worker-code, OpenChamber scheduled lane. Task 2987 (resume of the parked task, not a rebuild).

    • PR feat(usage-hub): add cny snapshot unit end-to-end + DeepSeek balance (#1052) #2370 — queue/2987-1052-cny-snapshot-unit, OPEN / CLEAN / MERGEABLE at b68ba887. basic: proxy port fallbacks SUCCESS, CodeRabbit neutral, no review findings and 0 unresolved threads. 9 files:

      • src/model.ts — SnapshotRecord.unit gains cny; src/snapshots.ts — the UNITS validation set accepts it, so a CNY record is no longer rejected as malformed.
      • src/snapshot-records.ts — UNIT_* handling for the new unit.
      • src/quota-gather-map.ts — label-only (balance) windows are no longer skipped; the DeepSeek balance is recorded as a CNY window instead of being silently dropped.
      • src/render.ts — CNY renders with its own symbol/format, not coerced to USD.
      • scripts/backfill-usage-snapshots.ts — header note updated: the balance is no longer "deliberately not backfilled" because the unit enum could not express it.
      • test/{usage,snapshot-writers,quota-gather-map}.test.ts — coverage for the new unit end to end.
    • Why it is not merged: ci: merge queue ejects every PR — no merge since #2233 (10:57Z), entries dropped 2-6 min into AWAITING_CHECKS #2403. main frozen at 5a34fa70 since 10:57:51Z (~11 h); merge-queue entries are ejected with reason=branch_protection_failure within seconds of the required check going green. Ruleset 26115813 has bypass_actors: [] and main's classic protection carries a push restrictions block (teams: [codeowners], apps: [github-actions]) the merge group cannot satisfy. Not a PR defect.

    • Your decision: (a) drop the classic push restrictions on main (or add the merge-queue actor), or (b) move basic: proxy port fallbacks into ruleset 26115813.

    • Resume condition: first PR merged through the queue → re-enqueue feat(usage-hub): add cny snapshot unit end-to-end + DeepSeek balance (#1052) #2370, merge, close this issue. Task 2987 is blocked (escalated-to-user), not parked.

    • Links: PR feat(usage-hub): add cny snapshot unit end-to-end + DeepSeek balance (#1052) #2370 · ci: merge queue ejects every PR — no merge since #2233 (10:57Z), entries dropped 2-6 min into AWAITING_CHECKS #2403 · task 2987

  15. dezren39
    added a commit that references this issue on Oct 30, 2026

    Merge pull request #2370 from developing-today/queue/2987-1052-cny-sn…

    b4b2f49
  16. dezren39
    closed this as completedin #2370on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

meta/follow-upFollow-up spun out of earlier workqueue/blockedQueue or user escalation statestatus/blockedQueue or user escalation stateuser/escalatedRequires a Drew decision or access

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.