Repository navigation
test(dogfood): re-pin the forced-reset gate code and the password-set ledger decisions to ruling C′ - #23512
Merged
objectstack-fleet[bot] merged 1 commit intoOct 14, 2026
Conversation
… ledger decisions to ruling C' The administrator-forced change (must_change_password) now answers 403 PASSWORD_RESET_REQUIRED on every lane, and the admin password-set ledger row records the revokeSessionsAndKeys switch (on every reset) and the revocation's counts (when it ran). Both pins keep their exact answer; only the answer moves to the ruled contract. Claude-Session: https://claude.ai/code/session_0121ooBYRmS8ziFXm9ai5YHm Co-authored-by: Claude <noreply@anthropic.com>
Contributor
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
Contributor
Author
席位核对
Verdict: ACCEPT. Not governed (
|
objectstack-fleet
Bot
deleted the
claude/issue-23493-dogfood-repin-ruling-c-prime
branch
October 14, 2026 16:12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #23493
Clause-②: no
What changed
Two dogfood pins still stated the contract from before ruling C′ (director record
6159450584, the maintainer's 「同意」; letter A6165848580sets the revocation ON by default). PR #23440 (0f059078ec) landed that ruling, and the hourly full run went red on Dogfood Regression Gate (3/3): 2 files, 4 tests, at both0d3ea295d1(run38568381233) and394f65e891(run38576826654). This PR re-pins both files to the ruled answer. Every assertion keeps its exacttoBe/ closed-set form, and nothing is skipped, deleted or widened. Test files only. No product source changes.1.
packages/qa/dogfood/test/bearer-lane-password-change.dogfood.test.ts, all three lanes.403+error.code === 'PASSWORD_RESET_REQUIRED'. It expectedPASSWORD_EXPIRED. The test title and the file header now name the new code.must_change_password) stops reusingPASSWORD_EXPIRED: it gets its own code (PASSWORD_RESET_REQUIRED, scopecredential)」.POST /auth/admin/create-user, whose answer assertsmustChangePassword === true.passwordHistoryCount(throughapplyConfigPatch), sopasswordExpiryDaysstays off.AuthManager.resolveUserAuthGates(plugin-auth/src/auth-manager.ts),PASSWORD_RESET_REQUIREDis pushed only formust_change_password, andPASSWORD_EXPIREDonly whenexpiryDaysis above 0 andpassword_changed_atis older than that.PASSWORD_RESET_REQUIREDis the ruled answer here, not a defect.runAdminSetUserPassword(/auth/admin/set-user-password). This file never calls it: it only creates the user, then signs in, changes the password, reads and attempts reuse with the user's own credentials. Measured three ways:2.
packages/qa/dogfood/test/admin-ledger-decision-metadata.dogfood.test.ts, the closed decision set ofuser.admin_password_set.required: ['event', 'passwordGenerated'],optional: [].required: ['event', 'passwordGenerated', 'revokeSessionsAndKeys'],optional: ['revokedSessions', 'revokedApiKeys', 'revocationComplete'].runAdminSetUserPassword(plugin-auth/src/admin-user-endpoints.ts) writes the metadata as follows:revokeSessionsAndKeysis the boolean switch. It is written on every admin password set, so it isrequired.revokedSessions,revokedApiKeysandrevocationCompleteare spread in only when the revocation ran (...(revocation ? {…} : {})), so they areoptional.AdminAuditDecisionstype, which declares the switch as required and the three counts with?. The table's existingorganizationIdfollows the same convention.admin-user-endpoints.test.ts,PASSWORD_SET_DECISIONS) holds the six-key set on the default-on path.6170015227): the triage namedrevokeSessionsAndKeysas the one missing key. The CI assertion stops at its first undeclared key, which hid three more. This fixture's reset leaves the switch at its default (on), so its row also carries the three counts. A one-key re-pin leaves this file red. The ablation's leg 2 below measures that.Verification
All local runs were on head
8b7306a355(basead5a7d7c39), under the shared verify lock, with the dogfood dependency closure built first:pnpm turbo run build --filter=@objectstack/dogfood --concurrency=2,VERDICT command-exit 0, 65/65 tasks.pnpm --filter @objectstack/dogfood exec vitest run --maxWorkers=2 test/bearer-lane-password-change.dogfood.test.ts test/admin-ledger-decision-metadata.dogfood.test.tsgaveTest Files 2 passed (2),Tests 20 passed (20)(12 bearer-lane tests, 8 ledger tests), exit 0. It ran twice: before the ablation, and again after the restore.pnpm --filter @objectstack/dogfood typecheck(tsc --noEmit) exited 0.tsc --listFilesOnlylists both edited files in that program (2 of 2).Ablation: each re-pinned expectation reverted to its old value
Each leg used
scripts/ablation-replace.mjsin WRAP mode. Every anchor hit 1 → 0, and every mutation was proved on disk by blob change andgrep -c. Every restore was proved: the blob equals HEAD andgit diff HEADis empty.toBe('PASSWORD_RESET_REQUIRED')→toBe('PASSWORD_EXPIRED'), and the ledger set back torequired: ['event', 'passwordGenerated'], optional: [](blobsc2170a9eaf66→1cd8a3348170,0826915c7b04→b8a4c082c149)4 failed / 16 passed: the 3 lanes, withexpected 'PASSWORD_RESET_REQUIRED' to be 'PASSWORD_EXPIRED', and the ledger control, withexpected [ 'event', 'passwordGenerated' ] to include 'revokeSessionsAndKeys'. These are the same 4 tests and the same assertion text as both hourly runs.revokeSessionsAndKeyskept, the three counts dropped (optional: []; blob0826915c7b04→24315e7155c7)1 failed / 7 passed: the ledger control, withexpected [ 'event', 'passwordGenerated', …(1) ] to include 'revokedSessions'After the restore, both blobs equal HEAD (
c2170a9eaf66,0826915c7b04),git diff HEADis empty, and the green run above was repeated at 20/20.Gates
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 53 commands on8b7306a355. Each one ran with its exit code captured before any pipe.--ranreconciles:53 derived, 51 run, 2 NOT-MEASURED, 0 UNRUN.check:nul-bytes,check:cross-package-test-inputs,check:test-source-aliasandcheck:issue-citations.check:dts-closureandcheck:lean-entry-closureexited 0 on a re-run after the closure build; their first run had nodist/.check:dual-build-cjs-loadsneeds the whole workspace built, beyond the dogfood closure.check:type-check-debt's own closure build timed out in the shared lock queue.Lint & Repo Gatesruns on this PR.node scripts/check-empty-changeset.mjs: exit 0, no changeset added.What this PR's CI cannot show
The
Dogfood Regression Gatejobs run only onpush/schedule/workflow_dispatch(ci.yml,github.event_name != 'pull_request' && github.event_name != 'merge_group'). This PR's checks therefore do not run either file. The local runs above are the pre-landing evidence. The first hourly full run after this lands is the authority, and it refreshes #23493.Acceptance notes
skip-changesetapplies. The diff is two test files in@objectstack/dogfood, aprivate: truepackage, so it publishes nothing. On this repo an empty-frontmatter changeset is refused (check-empty-changeset).origin/mainwas not merged in before opening. It moved four commits past the base (111b5821ce,5547ad451a,3a2adc8835,f9b421716d). A diffstat of that range overpackages/qa/dogfood,plugin-auth,plugin-audit,core,restandruntimetouches onlyruntime/src/domains/automation.tsand a test beside it (the automation flow doors). Neither is on the auth gate or the ledger path these pins read. Merging would rebuild the whole closure on a shared box for no overlap. This PR's CI runs on the merge ref.AdminAuditDecisionsinplugin-auth/src/admin-user-endpoints.tslists the closed members (event,passwordGenerated,placeholderEmail,membershipCreated,organizationId) and says each is "a decision that no field of the user stores, or a reference to another record". It names none of the four keys PR feat(spec,core,plugin-auth)!: an API key answers as its owner's session does when the ADR-0069 policy holds the account (#23287) #23440 added, and the three counts are neither a decision nor a reference: they are counts of what the revocation landed. The type itself declares them, and no user-field value reaches the row. Noted, not filed (carrier:none); this PR does not touch product source.Generated by Claude Code