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#test served 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:

PR where it hit diff
#7808 (#7658) PR CI, 15:39Z โ€” its diff busts the packages/spec cache packages/spec/scripts/** + regenerated content/docs/references/**
#7805 (#7094) kicked from the merge queue, 16:3xZ, after its own CI was fully green scripts/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