From 3364f683ccb8a2a89698d800b3d4deaf4c1b45b6 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 19 Sep 2026 23:32:45 +0000 Subject: [PATCH] docs(qa): re-anchor three approvals knownGaps on the sys_account.issuer retirement Three knownGap texts in the approvals area cited `packages/plugins/plugin-auth/src/backfill-account-issuer.ts, CREDENTIAL_ISSUER`. That module retired with `sys_account.issuer` when better-auth 1.7.3 rolled the issuer-scoped account identity back, so the citation names a file that is not there and a reader cannot tell whether the gap is closed or the citation rotted. There is no successor symbol to re-point at: `CREDENTIAL_ISSUER` survives only as history, in the retirement's migration entry and as a deliberately renamed test constant. So the texts keep the reason they exist to carry -- a password hash alone was not enough, and the failure was a silent lockout whose `User not found` warn pointed at the `sys_user` row rather than at the account -- and record that the trap retired with the column, anchored on `packages/spec/src/migrations/entries/semantic/18.sys-account-issuer-retired.ts`. The same pass withdraws the clauses the retirement falsified: the seed no longer derives the issuer from the dev admin's own row (nothing to derive), and the dogfood test no longer pins an issuer -- it pins the account under `(provider_id, account_id)` and asserts nothing still writes the retired field. One runner step in the same item told a runner to check `issuer=local:credential` when provisioning delegate B; it is withdrawn with them. Each item bumps `revision` and appends a `history` entry, per the checklist's change lifecycle. Claude-Session: https://claude.ai/code/session_017ef78bLdybu3AffehKkhfk Co-authored-by: Claude --- .../platform-checklist/areas/approvals.json | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/docs/qa/platform-checklist/areas/approvals.json b/docs/qa/platform-checklist/areas/approvals.json index 4dd89a76661..2e7e6a8f1fd 100644 --- a/docs/qa/platform-checklist/areas/approvals.json +++ b/docs/qa/platform-checklist/areas/approvals.json @@ -8,7 +8,7 @@ "title": "Per-group sign-off (会签) needs one approval from EACH group", "since": "v16", "status": "active", - "revision": 5, + "revision": 6, "priority": "P1", "surface": "browser", "personas": ["approver holding exactly one group (e.g. manager)", "second approver holding the other group (e.g. finance/auditor)"], @@ -20,7 +20,7 @@ ], "knownGaps": [ "[CLOSED by #9308 fixture 1 — the gap text stays because it carries the reason] Ada Auditor used to exist as a routable sys_user row only, so the finance-group decision needed either a hand-provisioned Ada account or the server-granted admin override (can_override), and the run record had to state which path was used. She is now a real login on a stock boot, so drive the REAL Ada session: the admin override is no longer an acceptable substitute here, because a decision laundered through the admin cannot show that the two groups resolved to two different people", - "[CLOSED by #9308 fixture 1 — the gap text stays because it carries the reason] provisioning that account needs more than a password hash: better-auth 1.7.0-rc.2 requires the credential account's issuer to equal local:credential (packages/plugins/plugin-auth/src/backfill-account-issuer.ts, CREDENTIAL_ISSUER). Without that one field, sign-in fails INVALID_EMAIL_OR_PASSWORD behind a misleading 'User not found' warn — the user exists and the hash is right, so the warn sends you looking in exactly the wrong place. What changed: examples/app-showcase/src/security/seed-approval-demo.ts now provisions the credential account itself (ensureCredentialAccount) through better-auth's own $context — its hasher, its internalAdapter.createAccount, and the issuer READ OFF the dev admin's own credential row rather than re-spelled — so both demo personas sign in with DEMO_PERSONA_PASSWORD ('showcase123', demo-personas.ts) on a stock dev boot. packages/qa/dogfood/test/showcase-demo-personas-loginable.dogfood.test.ts pins the sign-in end to end. Dev-only by construction: the bootstrap runs only when the dev admin exists, and that admin is hard-gated on NODE_ENV=development" + "[CLOSED by #9308 fixture 1 — the gap text stays because it carries the reason] provisioning that account needs more than a password hash, and for one release the missing half was an issuer: better-auth 1.7 keyed account identity on (issuer, accountId), so a credential row whose issuer was not the local credential issuer was invisible to findAccountByKey — sign-in failed INVALID_EMAIL_OR_PASSWORD behind a misleading 'User not found' warn pointing at the sys_user row rather than at the account: the user exists and the hash is right, so the warn sends you looking in exactly the wrong place. ⚠️ THE TRAP IS RETIRED, not merely closed by the fixture: better-auth 1.7.3 rolled the issuer-scoped account identity back and sys_account.issuer retired with it, together with the plugin-auth symbols that existed only to serve it — the durable record is packages/spec/src/migrations/entries/semantic/18.sys-account-issuer-retired.ts, and there is no successor module this citation could be re-pointed at. The key is (provider_id, account_id), internalAdapter.createAccount supplies both, and the derivation, its failure branch and the whole class of silent lockout behind it are gone. What still holds: examples/app-showcase/src/security/seed-approval-demo.ts provisions the credential account itself (ensureCredentialAccount) through better-auth's own $context — its hasher, its internalAdapter.createAccount — so both demo personas sign in with DEMO_PERSONA_PASSWORD ('showcase123', demo-personas.ts) on a stock dev boot. packages/qa/dogfood/test/showcase-demo-personas-loginable.dogfood.test.ts pins the sign-in end to end. Dev-only by construction: the bootstrap runs only when the dev admin exists, and that admin is hard-gated on NODE_ENV=development" ] }, "steps": [ @@ -87,7 +87,8 @@ { "revision": 2, "date": "2026-08-07", "change": "expanded to deep-test contract: concrete steps, multi-clause acceptance, negatives, variants", "ref": "claude/platform-test-checklist-ocwugl" }, { "revision": 3, "date": "2026-08-10", "change": "entry path refreshed: the inbox is opened through the account app's Approvals nav entry (component route) rather than the bare /system/approvals deep link, so the item exercises the path a real user takes after #7213", "ref": "#7331" }, { "revision": 4, "date": "2026-08-11", "change": "knownGaps records the better-auth issuer=local:credential provisioning detail — the one field that decides whether Ada can be driven as a real second session or the run falls back to the admin override; it used to be rediscovered every sweep, behind a 'User not found' warn that points at the wrong cause", "ref": "#7530" }, - { "revision": 5, "date": "2026-08-18", "change": "the fixture blocker is CLOSED, not merely documented: the showcase now provisions Ada's better-auth credential account at boot (issuer derived from the dev admin's own row), so she signs in on stock seeds. knownGaps rewritten as closed-by-fixture rather than deleted — the issuer detail is the reason the gap existed and the next sweep still needs it. The admin-override fallback is withdrawn as an acceptable path for this item", "ref": "#9308" } + { "revision": 5, "date": "2026-08-18", "change": "the fixture blocker is CLOSED, not merely documented: the showcase now provisions Ada's better-auth credential account at boot (issuer derived from the dev admin's own row), so she signs in on stock seeds. knownGaps rewritten as closed-by-fixture rather than deleted — the issuer detail is the reason the gap existed and the next sweep still needs it. The admin-override fallback is withdrawn as an acceptable path for this item", "ref": "#9308" }, + { "revision": 6, "date": "2026-09-19", "change": "the issuer knownGap is re-anchored rather than re-pointed: better-auth 1.7.3 rolled the issuer-scoped account identity back and sys_account.issuer retired with it, so the cited plugin-auth backfill module no longer exists and has no successor. The reason the gap carries is kept verbatim in substance — a password hash alone was not enough, and the failure was a silent lockout whose 'User not found' warn pointed at the wrong row — and the durable anchor is now the retirement's own migration entry in packages/spec. The clause describing the seed as reading the issuer off the dev admin's credential row is withdrawn as false: there is no issuer to read", "ref": "#17453" } ] }, { @@ -246,7 +247,7 @@ "title": "A submitter who is not an approver sees no approver buttons", "since": "v16", "status": "active", - "revision": 5, + "revision": 6, "priority": "P1", "surface": "browser", "personas": ["submitter holding NO approver position on their own pending request"], @@ -256,7 +257,7 @@ "knownGaps": [ "stock seeds route every request to positions the admin holds, so the admin is an approver on all of them (#3358) — needs one request addressed away from the signed-in persona", "[CLOSED by #9308 fixture 1 — the gap text stays because it carries the reason] the natural persona has existed since #3411 — Mei Phone (usr_showcase_phone_demo) submits EXP-2001/EXP-DEMO and holds no approver position — but she was a sys_user row only, so signing in as her needed an account provisioned by hand. She is now a real login on a stock boot: seed-approval-demo.ts gives both demo personas a better-auth credential account (ensureCredentialAccount), password DEMO_PERSONA_PASSWORD ('showcase123', demo-personas.ts)", - "[CLOSED by #9308 fixture 1 — the gap text stays because it carries the reason] provisioning that account needs more than a password hash: better-auth 1.7.0-rc.2 requires the credential account's issuer to equal local:credential (packages/plugins/plugin-auth/src/backfill-account-issuer.ts, CREDENTIAL_ISSUER). Without that one field, sign-in fails INVALID_EMAIL_OR_PASSWORD behind a misleading 'User not found' warn — the user exists and the hash is right, so the warn sends you looking in exactly the wrong place. The showcase now derives that issuer from the dev admin's own credential row and stamps it, so the field cannot drift from what better-auth looks accounts up under; packages/qa/dogfood/test/showcase-demo-personas-loginable.dogfood.test.ts pins both the issuer and the sign-in", + "[CLOSED by #9308 fixture 1 — the gap text stays because it carries the reason] provisioning that account needs more than a password hash, and for one release the missing half was an issuer: better-auth 1.7 keyed account identity on (issuer, accountId), so a credential row whose issuer was not the local credential issuer was invisible to findAccountByKey — sign-in failed INVALID_EMAIL_OR_PASSWORD behind a misleading 'User not found' warn pointing at the sys_user row rather than at the account: the user exists and the hash is right, so the warn sends you looking in exactly the wrong place. ⚠️ THE TRAP IS RETIRED, not merely closed by the fixture: better-auth 1.7.3 rolled the issuer-scoped account identity back and sys_account.issuer retired with it, together with the plugin-auth symbols that existed only to serve it — the durable record is packages/spec/src/migrations/entries/semantic/18.sys-account-issuer-retired.ts, and there is no successor module this citation could be re-pointed at. The key is (provider_id, account_id), internalAdapter.createAccount supplies both, and the derivation, its failure branch and the whole class of silent lockout behind it are gone. The showcase therefore derives and stamps nothing: seed-approval-demo.ts hands userId, providerId and accountId to internalAdapter.createAccount and better-auth owns the rest. packages/qa/dogfood/test/showcase-demo-personas-loginable.dogfood.test.ts pins the account under the key sign-in resolves on and the sign-in behind it, and asserts that nothing still writes the retired field — it no longer pins an issuer, because there is none", "the FIRST gap above is unaffected and still governs the fixture: stock seeds route every request to positions the admin holds, so the item's request must remain the one addressed AWAY from the signed-in persona (Mei's EXP-2001). A run that signs in as the admin proves nothing here, loginable personas or not" ] }, @@ -308,7 +309,8 @@ { "revision": 2, "date": "2026-08-07", "change": "expanded to deep-test contract: concrete steps, multi-clause acceptance, negatives, variants", "ref": "claude/platform-test-checklist-ocwugl" }, { "revision": 3, "date": "2026-08-10", "change": "entry path refreshed to the account app's Approvals nav entry (component route) after #7213/#7234", "ref": "#7331" }, { "revision": 4, "date": "2026-08-11", "change": "knownGaps records the better-auth issuer=local:credential provisioning detail — with it, Mei's sign-in is provisionable at runtime and this item's standing fixture blocker becomes payable instead of permanent", "ref": "#7530" }, - { "revision": 5, "date": "2026-08-18", "change": "UNBLOCKED. The showcase provisions Mei's better-auth credential account at boot, so the submitter persona this item is built around is a real, stock login and `blocked(fixture)` is removed. knownGaps rewritten as closed-by-fixture rather than deleted, and the one gap that is NOT closed (stock requests route to the admin, so the persona choice is still load-bearing) is restated so it does not get read as closed by association", "ref": "#9308" } + { "revision": 5, "date": "2026-08-18", "change": "UNBLOCKED. The showcase provisions Mei's better-auth credential account at boot, so the submitter persona this item is built around is a real, stock login and `blocked(fixture)` is removed. knownGaps rewritten as closed-by-fixture rather than deleted, and the one gap that is NOT closed (stock requests route to the admin, so the persona choice is still load-bearing) is restated so it does not get read as closed by association", "ref": "#9308" }, + { "revision": 6, "date": "2026-09-19", "change": "same re-anchoring as the sibling items: the retired plugin-auth backfill citation is replaced by the retirement's migration entry in packages/spec, the reason is kept, and the two falsified clauses are withdrawn — the showcase no longer derives the issuer from the dev admin's row, and the dogfood test no longer pins an issuer (it pins the account under the key sign-in resolves on and asserts nothing still writes the retired field)", "ref": "#17453" } ] }, { @@ -647,7 +649,7 @@ "title": "An active out-of-office delegation reroutes an individually-routed approver to the delegate; expiring the window hands the slot back", "since": "v16", "status": "active", - "revision": 3, + "revision": 4, "priority": "P2", "surface": "mixed", "personas": ["dev admin — the DELEGATOR A: the delegation row is written BY them FOR them (sys_approval_delegation is self-service-only, so the delegator must be whoever is authenticated)", "a SECOND REAL runtime account — the DELEGATE B (Ada Auditor usr_showcase_auditor_demo, provisioned as a real login per knownGaps), who holds their own bearer token and decides the rerouted request as themselves"], @@ -659,12 +661,12 @@ ], "knownGaps": [ "⛔ the delegation CANNOT be set up as a third party on behalf of another delegator: sys_approval_delegation is self-service-only and there is no admin exemption (#4839 — bindDelegationWriteGuard rejects a foreign delegator_id with FORBIDDEN, and an absent one is stamped to the caller). Combined with the seeded demo personas having no auth account of their own, the 'admin delegates on behalf of Mei' shape this item used to prescribe is not constructible by ANYBODY. The run drives the mirror image instead — the admin delegates their OWN slot to a real second account — which is also the stronger test, because the delegate decides under a genuinely separate identity and the audit's no-laundering clause becomes falsifiable (#7517)", - "[CLOSED by #9308 fixture 1 — the gap text stays because it carries the reason] provisioning a seeded demo persona as a real login needs more than a password hash: better-auth 1.7.0-rc.2 requires the credential account's issuer to equal local:credential (packages/plugins/plugin-auth/src/backfill-account-issuer.ts, CREDENTIAL_ISSUER). Without that one field, sign-in fails INVALID_EMAIL_OR_PASSWORD behind a misleading 'User not found' warn — the user exists and the hash is right, so the warn sends you looking in exactly the wrong place. Delegate B is now constructible with no setup: seed-approval-demo.ts provisions Ada Auditor's credential account at boot (issuer derived from the dev admin's own row), password DEMO_PERSONA_PASSWORD ('showcase123', demo-personas.ts), pinned by packages/qa/dogfood/test/showcase-demo-personas-loginable.dogfood.test.ts. Drive the real second account; do not record blocked(fixture) for this reason", + "[CLOSED by #9308 fixture 1 — the gap text stays because it carries the reason] provisioning a seeded demo persona as a real login needs more than a password hash, and for one release the missing half was an issuer: better-auth 1.7 keyed account identity on (issuer, accountId), so a credential row whose issuer was not the local credential issuer was invisible to findAccountByKey — sign-in failed INVALID_EMAIL_OR_PASSWORD behind a misleading 'User not found' warn pointing at the sys_user row rather than at the account: the user exists and the hash is right, so the warn sends you looking in exactly the wrong place. ⚠️ THE TRAP IS RETIRED, not merely closed by the fixture: better-auth 1.7.3 rolled the issuer-scoped account identity back and sys_account.issuer retired with it, together with the plugin-auth symbols that existed only to serve it — the durable record is packages/spec/src/migrations/entries/semantic/18.sys-account-issuer-retired.ts, and there is no successor module this citation could be re-pointed at. The key is (provider_id, account_id), internalAdapter.createAccount supplies both, and the derivation, its failure branch and the whole class of silent lockout behind it are gone. Delegate B is constructible with no setup and nothing about her issuer to get right: seed-approval-demo.ts provisions Ada Auditor's credential account at boot, password DEMO_PERSONA_PASSWORD ('showcase123', demo-personas.ts), pinned by packages/qa/dogfood/test/showcase-demo-personas-loginable.dogfood.test.ts. Drive the real second account; do not record blocked(fixture) for this reason", "authoring the scratch flow needs a writable/scratch package — the showcase ships read-only" ] }, "steps": [ - "boot showcase isolated (dogfood §0); provision B as a real login (see knownGaps: the credential account's issuer must be local:credential) and hold B's bearer token separately from the admin's", + "boot showcase isolated (dogfood §0); provision B as a real login — a stock boot already does it, see knownGaps — and hold B's bearer token separately from the admin's", "sign in as the dev admin (the delegator A)", "in a writable/scratch package author + register (POST /api/v1/automation) an autolaunched flow with a single approval node whose approvers=[{type:'user', value:''}], behavior first_response", "baseline (no delegation): trigger the flow (POST /api/v1/automation//trigger); GET /api/v1/approvals/requests?status=pending, find the new request, GET /:id — pending_approvers must be [A]; GET /:id/actions shows NO ooo_substitute row", @@ -724,7 +726,8 @@ "history": [ { "revision": 1, "date": "2026-08-08", "change": "initial — pins the #1322 OOO delegation reroute: active A→B window reroutes an individually-routed slot to B (audited + notified, decided under B's own identity); expiry hands it back to A at resolution time", "ref": "claude/platform-test-checklist-ocwugl" }, { "revision": 2, "date": "2026-08-11", "change": "persona shape rewritten around what is constructible: the old fixture had the admin write a delegation on behalf of a non-admin delegator, which sys_approval_delegation's self-service-only guard refuses from everybody (#4839) and which the named delegator could not do either (no auth account). Now A = the signed-in admin delegating their OWN slot and B = a second REAL runtime account deciding with its own bearer token — the mirror image #7517 actually drove, and the stronger test. Added the foreign-delegator refusal as a negative and the better-auth issuer provisioning detail to knownGaps", "ref": "#7530" }, - { "revision": 3, "date": "2026-08-18", "change": "delegate B needs no hand-provisioning any more: the showcase gives Ada Auditor a real better-auth credential account on a stock boot, so the issuer knownGap is rewritten as closed-by-fixture. The OTHER two gaps are untouched and still bind — the self-service-only delegation guard (#4839) and the writable/scratch package the individually-routed flow needs", "ref": "#9308" } + { "revision": 3, "date": "2026-08-18", "change": "delegate B needs no hand-provisioning any more: the showcase gives Ada Auditor a real better-auth credential account on a stock boot, so the issuer knownGap is rewritten as closed-by-fixture. The OTHER two gaps are untouched and still bind — the self-service-only delegation guard (#4839) and the writable/scratch package the individually-routed flow needs", "ref": "#9308" }, + { "revision": 4, "date": "2026-09-19", "change": "same re-anchoring as the sibling items: the retired plugin-auth backfill citation is replaced by the retirement's migration entry in packages/spec and the reason is kept, the parenthetical 'issuer derived from the dev admin's own row' is withdrawn as false, and the step that told a runner to check issuer=local:credential when provisioning delegate B goes with it — that field no longer exists", "ref": "#17453" } ] }, {