Skip to content

main is red: src/service passed its authored-total token ceiling when PR #2079 and PR #2080 landed back to back (~22,001 / 22,000) #2082

Closed

Description

@objectstack-fleet

Filing gate ①: main is red (shared damage). Filed by the repo:hotcrm seat (session_01WnMDsLSaUQUD41WaWnADcF), which landed both PRs. ⛔ Not a claim (the claim follows as its own comment).

What is red

Why

Fix

Fix forward, behaviour unchanged: shrink src/service's authored surface by at least the overrun plus a small margin. Compress metadata or drop duplication, as #2037 / PR #2039 did. ⛔ No ceiling change: the script's own refusal text names that as the maintainer's ruling to make. skip-changeset applies (nothing ships to users).

Acceptance

node scripts/check-source-token-ratchet.mjs exits 0 on the PR, with every layer's reading quoted; pnpm verify green; no behaviour change (the full test suite unchanged in count and green).


Generated by Claude Code

Activity

  1. added
    bugSomething isn't working
    priority:p1High: required for production / M2
    pm:dispatchedDispatched to a dev agent by /pm-dispatch
    on Oct 12, 2026
  2. objectstack-fleet commented on Oct 12, 2026

    @objectstack-fleet
    ContributorAuthor

    Claim: PM loop round R81 (main-red stanch)
    Session: session_01WnMDsLSaUQUD41WaWnADcF
    Account: os-warren (the seat's linked user as GET /user answers it; always the card's assignee)
    Branch: claude/issue-2082-service-token-shrink
    Worktree: hotcrm-issue-2082
    Domain: repo:hotcrm (single-lane repo, no domain:* taxonomy)
    Seat: repo:hotcrm#1
    File surface: src/service/** authored files (not src/service/data, which is outside the ratchet), compression or de-duplication only, behaviour unchanged; their tests only if a pin names the shrunk text; no changeset (skip-changeset: nothing ships to users) (stop on breach; explain in the report)
    Container & model: S (mechanical shrink, judged by the ratchet and the unchanged suite), mode:subagent, model: default (dispatch-gates --tier --repo objectstack-ai/hotcrm hits no declared tier glob; the tier stays the PM's per-card call)
    Clause-②: no
    Responsibility: the seat: PR #2079 and PR #2080 each fit src/service's authored-total ceiling alone and landed back to back over it (~22,001 / 22,000) | none: the merge queue re-ran no build on the combined tree | every open PR inherits the red Build and Test
    Thread-read: none
    Serial constraints cleared: #2072 (in flight, src/service/pages/case_detail.page.ts header actions) also pays tokens in src/service; this stanch lands first, and #2072 merges main after it. This card ⛔ does not touch case_detail.page.ts's header actions list.


    Generated by Claude Code

  3. objectstack-fleet commented on Oct 12, 2026

    @objectstack-fleet
    ContributorAuthor

    os-dev-report

    {
      "issue": 2082,
      "status": "done",
      "branch": "claude/issue-2082-service-token-shrink",
      "pr": "https://github.com/objectstack-ai/hotcrm/pull/2085",
      "session": "session_01WnMDsLSaUQUD41WaWnADcF (subagent: the dispatching seat's id)",
      "premise_still_valid": true,
      "summary": "The red reproduced on base 283a31f: ratchet exit 1, src/service authored total ~22,001 against a ~22,000 ceiling. The fix is one de-duplication in src/service/views/case.view.ts. The nine identical `data: { provider: 'object', object: 'crm_case' }` literals (the default list, the seven named list views and the web_to_case form) became one `const data = {...} as const` passed by shorthand `data,`. src/service drops 330 stripped chars (~83 tokens) to ~21,918 / 22,000. No ceiling, script, identifier, label, translation key or behaviour changed, and case_detail.page.ts and case.hook.ts are untouched. Draft PR #2085 is open with assignee os-warren and the skip-changeset label.",
      "tests": "HEAD 0f8cef9 (clean tree). Base suite on 283a31f, one pnpm test run under the lock: 'Test Files  1 failed | 178 passed (179)', 'Tests  1 failed | 3683 passed | 1 skipped (3685)'. The only failure is test/source-token-ratchet.test.ts 'is green, and every package carries a ceiling...' (this red). Head suite as two file halves (union = all 179 files under test/, checked with diff): half1 'Test Files  90 passed (90)', 'Tests  1631 passed | 1 skipped (1632)', VERDICT command-exit 0; half2 'Test Files  89 passed (89)', 'Tests  2053 passed (2053)', VERDICT command-exit 0. Union: 179/179 files, 3684 passed + 1 skipped of 3685, so the counts equal base and the one red test is green. Value identity: the base and head CaseViews, both imported via tsx, are isDeepStrictEqual true and JSON.stringify-identical (6224 bytes each). No ablation applies (no new test or guard).",
      "gates": [
        "pnpm validate && pnpm typecheck && pnpm lint && pnpm lint:i18n-gate && pnpm hygiene && pnpm hygiene:tokens && pnpm build @0f8cef9: 'os-verify-lock: VERDICT command-exit 0 · held the lock 38s'. Steps: '✓ Validation passed'; tsc --noEmit clean; lint '18 suggestion(s)', all on sales/revenue objects and approval flows, none in src/service; '✓ i18n lint gate: 0 `i18n/missing-*` issues'; '✓ source hygiene clean'; '✓ source token ratchet clean'; '✓ Build complete' with 8 author-time warnings, all on approval flows outside src/service",
        "vitest half1 @0f8cef9: 'VERDICT command-exit 0 · held the lock 250s'",
        "vitest half2 @0f8cef9: 'VERDICT command-exit 0 · held the lock 271s'",
        "Not run locally, left to CI: test:coverage (coverage scope src/*/objects/*.hook.ts untouched) and test:e2e",
        "CI on PR head, read once at 11:22Z: Quality Checks success (it runs the ratchet); Build and Test (22.x) in_progress; Playwright in_progress; CodeQL in_progress; Check Changeset has one failure (the run before the label landed) and one skipped (after skip-changeset was applied)"
      ],
      "ratchet": {
        "before_283a31f_exit": 1,
        "after_0f8cef9_exit": 0,
        "src/service business semantics": "~13,008 (52,030 chars) → ~13,008 (52,030 chars), ceiling ~14,000",
        "src/service interaction layer": "~5,687 (22,746 chars) → ~5,604 (22,416 chars), ceiling ~7,000",
        "src/service other authored metadata": "~3,307 (13,226 chars) → ~3,307 (13,226 chars), no ceiling",
        "src/service authored total": "~22,001 (88,002 chars) → ~21,918 (87,672 chars), ceiling ~22,000, headroom ~82",
        "verdict_before": "✗ src/service authored total is ~22,001 tokens; the ratchet ceiling is ~22,000 (over by ~1).",
        "verdict_after": "✓ src/service authored total ~21,918 tokens (ceiling ~22,000; headroom ~82). / ✓ source token ratchet clean",
        "other packages": "src/sales, src/marketing and src/revenue readings identical before and after",
        "with_2072": "#2072's head ac7aa80 (PR #2084) measures 87,975 chars on its own (27 fewer than base); combined with this PR the estimate is ~21,911, still under"
      },
      "line_budget": "1 file, +17 -9 (src/service/views/case.view.ts; the +8 net is a 6-line doc comment plus the const line and a blank line)",
      "files_changed": ["src/service/views/case.view.ts"],
      "deviations": [
        "Card/dispatch said '178 files'. The measured base is 179 test files: 178 passed and 1 failed (the ratchet test). Head: 179 passed.",
        "Both test runs were started as background jobs and waited on in the foreground with tail --pid inside this turn. The base used one unsplit pnpm test acquisition (485s); the head used two half acquisitions on the same sha.",
        "Ratchet advisory not acted on: it suggests re-anchoring the src/service interaction-layer ceiling to ~6,000. The dispatch forbids ceiling edits, so this is recorded in the PR's Acceptance notes only."
      ],
      "mcp_calls": "0",
      "api_writes": "3 relay strokes (each one POST /repos/objectstack-ai/objectstack/dispatches executed as objectstack-fleet[bot]) carrying 4 REST requests: (1) pr_create = POST /repos/objectstack-ai/hotcrm/pulls (draft) + POST /repos/objectstack-ai/hotcrm/issues/2085/assignees [os-warren]; (2) label-write labels_add = POST /repos/objectstack-ai/hotcrm/issues/2085/labels [skip-changeset]; (3) os-dev-report comment = POST /repos/objectstack-ai/hotcrm/issues/2082/comments. git push is not counted.",
      "open_questions": [],
      "out_of_scope_findings": [
        "carrier: 承接者:无 · src/service interaction-layer ceiling ~7,000 has ~1,396 headroom and the ratchet advises re-anchoring to ~6,000; noted in PR #2085 Acceptance notes, not filed (a ceiling change is outside this card by ruling)"
      ]
    }

    Generated by Claude Code

  4. objectstack-fleet commented on Oct 12, 2026

    @objectstack-fleet
    ContributorAuthor

    Verdict and landing: os-dev report on PR #2085 — ACCEPT, landed. PR #2085 MERGED as 0f84c9c on main through the merge queue. Not governed (1 file, src/service/views/case.view.ts, +17 / −9; skip-changeset). repo:hotcrm seat, session_01WnMDsLSaUQUD41WaWnADcF, 2026-10-12T11:47Z.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingpriority:p1High: required for production / M2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions