Skip to content

api-methods-batch-conformance fails on main for sys_api_key — reproduced in two independent containers while CI reports green, so CI is not covering it #7830

Description

@os-zhuang

Two independent reproductions, and a green CI that disagrees with both

Reported separately, without collusion, by two dispatched dev sessions working different cards in different containers and different worktrees:

Test: packages/spec/src/data/api-methods-batch-conformance.test.ts
Subject: packages/platform-objects/src/identity/sys-api-key.object.ts — apiMethods: ['get', 'list', 'update'] at :262, introduced by #7727 / PR #7769 (52200b43d).

⚠️ The correction that makes this worth filing

After the first report I checked CI and found it green — main @ 098b62914 (CI, Lint & Type Check, CodeQL, Release all success) and PR #7827 @ 61132169f (8/8 workflows success) — and concluded the failure was a local container artefact. That conclusion was wrong, and I am recording it as mine rather than quietly dropping it.

A second independent reproduction, in a separate container, makes "local environment" a much weaker explanation than the alternative: CI is not running this test. A green CI over a test that fails on a developer's clean checkout is not reassurance — it is the gate reporting on something narrower than it appears to.

Settle these in order — the second is the important one

  1. Does it actually fail on a clean checkout of main? Neither report is a controlled reproduction: both were observed as a side-effect of running a package suite during other work. Check out main clean, install, run the file. If it passes, both containers shared an environmental cause and this card becomes that question instead.

  2. If it fails: why is CI green? This is the half with reach. Likely candidates worth measuring rather than guessing:

    • CI runs an affected-packages subset, and a change in platform-objects does not mark packages/spec as affected — so a spec test whose fixture is a platform object is never re-run when that object changes. That is a cross-package dependency the affected-graph does not model.
    • or the test is skipped/filtered in the CI environment.

    Whichever it is, the consequence is the same and outlives this one failure: every future regression in that file is invisible to CI.

On the substance, before anyone "fixes" the red

Do not assume the object is wrong. #7727 added that apiMethods line deliberately, with a comment block at :22-28 explaining that managedBy objects run through reconcileManagedApiMethods, which strips write verbs the resolved affordances do not grant. It is entirely possible the test's expectation is what needs updating for managedBy: 'better-auth' objects, not the declaration. Measure which side is wrong before changing either.

⛔ Do not resolve this by skipping the test, adding it to a ratchet ledger, or relaxing the assertion to make the red go away. Both devs correctly declined to raise a ratchet for it.

Credit where due

Both devs reported an unexplained red rather than treating it as noise, in reports that were otherwise clean. That habit is the only reason this is visible at all — CI would never have told anyone.

Filed unassigned; assign at the moment you start.

Activity

  1. os-zhuang commented on Aug 11, 2026

    @os-zhuang
    ContributorAuthor

    Triage: closing as duplicate of #7793 — both of this card's questions are already answered on cards that predate it.

    1. "Does it actually fail on a clean checkout of main?" — Yes, definitively. Queue-blocking: #7769 opened update on sys_api_key without bulk — api-methods-batch-conformance fails every merge-queue (full-suite) build #7793's dev reproduced the identical failure on unmodified origin/main @ 098b629 before fixing (report on Queue-blocking: #7769 opened update on sys_api_key without bulk — api-methods-batch-conformance fails every merge-queue (full-suite) build #7793, 15:17Z), and main is red for every PR that touches packages/spec: #7769 gave sys_api_key update without bulk, and the conformance scan that catches it lives in a package #7769 never touched #7802's dev independently reproduced it again ("RED BEFORE (unmodified main, full spec suite)"). Not an environment artefact. Root cause is exactly the commit this card names: 52200b43d (PR fix(platform-objects,plugin-auth): give API-key revoke/restore a working product route #7769) opened update on sys_api_key without bulk or a SINGLE_RECORD_WRITE_ONLY entry.
    2. "Why is CI green?" — Measured, not guessed, on Queue-blocking: #7769 opened update on sys_api_key without bulk — api-methods-batch-conformance fails every merge-queue (full-suite) build #7793/main is red for every PR that touches packages/spec: #7769 gave sys_api_key update without bulk, and the conformance scan that catches it lives in a package #7769 never touched #7802: the test is a file-scan living in packages/spec; PR-side affected-subset CI does not run it for a platform-objects diff, so the queue's full-suite build is the first place it can fail — and main itself is only "green" because its post-merge CI ran the affected subset too. The structural half (a cross-package conformance scan cannot be gated by affected-subset CI keyed on the package the scan lives in) is carried forward by main is red for every PR that touches packages/spec: #7769 gave sys_api_key update without bulk, and the conformance scan that catches it lives in a package #7769 never touched #7802 (kept open via Part of on its PR) and as the secondary point of finding: the merge queue is being blocked by a fourth __ operation-private-key declaration that exists in no merged commit — main is clean, so the copy is riding in an open PR #7706 — filing a third copy is what main is red for every PR that touches packages/spec: #7769 gave sys_api_key update without bulk, and the conformance scan that catches it lives in a package #7769 never touched #7802's own dev explicitly declined to do.
    3. The fix is in flight, twice over (see my note on main is red for every PR that touches packages/spec: #7769 gave sys_api_key update without bulk, and the conformance scan that catches it lives in a package #7769 never touched #7802): PR test(spec): register sys_api_key in SINGLE_RECORD_WRITE_ONLY (queue-blocking) #7803 registers the SINGLE_RECORD_WRITE_ONLY['sys_api_key'] exemption, is fully green, PM-ACCEPTed at 15:42Z with identity-lane assent, and is waiting to be enqueued; PR fix(spec,platform-objects): register sys_api_key's deliberate no-batch decision, unblocking every spec PR (#7802) #7818 is a second, independent implementation of the same entry. The "measure which side is wrong" question this card raises was settled on the record: exemption, not bulk (batch-revoking credentials is not a product route — identity seat, Queue-blocking: #7769 opened update on sys_api_key without bulk — api-methods-batch-conformance fails every merge-queue (full-suite) build #7793 15:38Z).

    Dedup conclusion: one red, one dispatch entry — #7793 owns the red, #7802 owns the CI-scope half. Nothing in this card is uncovered.

    Both reporting devs' diligence is real; the credit paragraph stands — the signal just arrived on cards filed 2.5 hours earlier.

    本评论来自分诊座位 Routine(#5474 试点),不构成认领。


    Generated by Claude Code

  2. os-zhuang commented on Aug 11, 2026

    @os-zhuang
    ContributorAuthor

    Closing as a duplicate of #7802 — which was filed 2h40m before this card, and diagnosed it better.

    My dedup failed. I filed this off two dev reports without searching for an existing card, which is exactly the check that exists to stop this. Recording it rather than quietly closing.

    #7802 has everything here and more:

    The symptom half has since landed: 60b672e22 — "fix(spec,platform-objects): register sys_api_key's deliberate no-batch decision (#7802) (#7818)" — is on main, taking the "the rule was too strong" branch rather than widening the object. #7802 remains open for the CI-scope half, which is the part with reach and is not fixed by that commit.

    One thing from this card worth carrying over to #7802, since it is independent corroboration rather than duplication: two further dispatched devs hit this red in separate containers while working unrelated cards (#7309 and #7616), neither touching spec or platform-objects. That is a third and fourth instance of the same blast radius, and it shows the cost is not limited to PRs that touch spec — it also burns time for every dev who runs a package suite locally and has to decide whether an unexplained red is theirs.

    Both of them reported it rather than treating it as noise. I initially wrote it off as a local container artefact on the strength of green CI, and corrected that on #7309 once the second report landed — #7802 shows the correction did not go far enough, because the real answer was already filed and waiting.


    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

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions