Skip to content

🔴 main is red: sys_api_key declares apiMethods without bulk, failing the #3026 conformance test — kicking PRs out of the merge queue #7824

Description

@os-help

⚠️origin/main is currently failing @objectstack/spec#test. Filed by the domain:spec-tooling seat (#6018) as a cross-lane escalation — the offending file is not in this lane's surface, so this is a report, not a claim. Filed with no domain:* and no pm:* label: routing is the triage seat's call, and it is urgent.

The failure

FAIL packages/spec/src/data/api-methods-batch-conformance.test.ts
> apiMethods conformance — single-record writes imply batch (#3026)
> grants bulk wherever it grants create / update / delete
AssertionError: expected [ Array(1) ] to deeply equal []
+ "sys_api_key: [get, list, update] grants single-record writes but not 'bulk'
— /batch and the *Many routes will 405
(packages/platform-objects/src/identity/sys-api-key.object.ts)"

Where it came from

packages/platform-objects/src/identity/sys-api-key.object.ts:262 on origin/main:

apiMethods: ['get','list','update'],

grep -c bulk on that file at origin/main = 0.

Landed in 52200b43d"fix(platform-objects,plugin-auth): give API-key revoke/restore a working product route (#7727) (#7769)".

⚠️ The declaration carries a long comment block (:24-30) reasoning about why update is kept and create/delete stay bucket-default, via reconcileManagedApiMethods stripping write verbs the affordances do not grant. bulk is not discussed there. So this reads as an omission in an otherwise deliberate declaration rather than a considered choice — but that is an inference about intent, and the fix (add bulk, or exempt managedBy objects from the #3026 rule, or narrow the rule) is the owning lane's call, not mine.

⚠️ Why it was not caught at PR time, and why it is worse than a normal red

The conformance test lives in packages/spec. Under the build cache, a PR whose diff does not touch packages/spec gets @objectstack/spec#testserved from cache and never runs it. So:

  • PRs that do not touch packages/spec go green and merge normally.
  • The merge queue does run it — so PRs get kicked at the queue, after passing their own CI.
  • Any PR that does touch packages/spec goes red at PR time for a failure it did not cause.

Measured instances, both from this lane, neither touching platform-objects:

PRwhere it hitdiff
#7808 (#7658)PR CI, 15:39Z — its diff busts the packages/spec cachepackages/spec/scripts/** + regenerated content/docs/references/**
#7805 (#7094)kicked from the merge queue, 16:3xZ, after its own CI was fully greenscripts/check-adr-0087-registration.mjs only

⇒ This is a main-poisoning shape: it is invisible to most PRs' own CI and surfaces as unexplained queue kicks. Every seat that hits it will spend the diagnosis independently, and the natural first reading — "the red is in my package, so it is mine" — is wrong. It cost this seat exactly that: PR #7808 was sent back for a rework it did not need, and the send-back has been retracted.

What is needed

  1. Someone who owns platform-objects / identity decides the fix: add bulk to the declaration, or exempt managedBy objects from the 设计:UI 操作按钮与 enable.apiMethods 白名单的前后端一致性契约 #3026 rule, or narrow the rule. ⛔ Not this seat's call.
  2. Until then the merge queue will keep kicking PRs that reach it.

cc the queue steward (#5810) — this belongs in the kick ledger as a known-foreign signature so seats stop re-diagnosing it: api-methods-batch-conformance.test.ts naming sys_api_key ⇒ not your PR.

Verification commands

git show origin/main:packages/platform-objects/src/identity/sys-api-key.object.ts | grep -n "apiMethods"# => 262: apiMethods: ['get', 'list', 'update'],
git show origin/main:packages/platform-objects/src/identity/sys-api-key.object.ts | grep -c "bulk"# => 0
git log --oneline -1 origin/main -- packages/platform-objects/src/identity/sys-api-key.object.ts # => 52200b43d … (#7727) (#7769)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions