Repository navigation
Commit 67ab712
<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuMjbPDrsigsyqoKsV4WZQMz)_
Part of #25224
Clause-②: no
Metadata-protocol: none
Ruling-ref: 6351993113
The basis for the `Clause-②: no` line: dropping a type assertion widens
no accept set and no public surface, and a type assertion has no emitted
byte. Measured below: `@objectstack/plugin-auth`'s `dist/index.js`,
`dist/index.mjs`, `dist/index.d.ts` and `dist/index.d.mts` are
byte-identical to base.
**The sweep PR of ruling `6351993113` item 1**, between cut 2 (PR
#25307, landed note `6354354210`) and the cut(s) that move the nine
methods these sites sit in. It follows the amended claim `6354594310`.
#25224 stays open for the later cuts.
`scripts/query-options-erasure-baseline.json` grandfathered
`auth-manager.ts` at 12 engine query-options `any`-erasures. This PR
drops all 12 in place and ratchets the baseline down, so the nine
methods can later move into new modules without carrying a counted site
into a file the baseline does not list. Nothing else changes: +12 / −13
over 2 files.
Branch: `claude/project-thread-lg3wrj`, the harness-pinned branch for
this session, restarted from `origin/main` `9dc1f42d50` after #25307
merged. It names no issue, so the card relation is this body's first
line.
## What changes
1. **`packages/plugins/plugin-auth/src/auth-manager.ts`**: 12 lines.
Each counted closer `} as any);` becomes `});`. Each one closes the
options literal (argument 1) of an `engine.findOne`, `engine.find` or
`engine.count` call that carries `context: SYSTEM_CTX`. The edit was
made from the AST: for each call ESLint reports, the script removed
exactly the text ` as any` between the literal's `}` and the call's
`);`, and refused any site where those 7 characters were anything else.
2. **`scripts/query-options-erasure-baseline.json`**: exactly what `pnpm
check:query-options-erasure --update` writes. The file's key leaves (one
line). This is a `scripts/` ledger, and `scripts/` gate files are
`domain:spec`'s by the anchoring exception. **Cross-lane, declared:**
the edit is the gate's own prescribed ratchet output, not a gate edit.
⛔ Not in this PR (ruling item 1):
- the 13 `engine.update(…, { context: SYSTEM_CTX } as any)` casts, which
the ratchet does not count;
- any `as unknown as EngineQueryOptions` or `const opts:
EngineQueryOptions` rewrite;
- any other erasure in the file;
- `eslint.config.mjs` or any `scripts/*.mjs`;
- any method move.
## The twelve sites
Re-located by shape at base `9dc1f42d50`: ESLint's
`query-options/no-any-erasure`, run on the file's text with the
grandfathering lifted, reports exactly 12, the baseline's count. These
are the ruling's twelve sites in the ruling's nine methods; only their
line numbers have moved since `49185cdb`.
| method | call (line) | closer line |
|---|---|---|
| `stampIdentitySource` | `engine.findOne` `:8854` · `engine.count`
`:8864` | `:8856` · `:8867` |
| `refreshMustChangeCacheIfStale` | `engine.count` `:9007` | `:9009` |
| `refreshOrgMfaCacheIfStale` | `engine.count` `:9035` | `:9037` |
| `resolveUserAuthGates` | `engine.findOne` `:9184` · `engine.findOne`
`:9193` | `:9188` · `:9195` |
| `assertPasswordNotReused` | `engine.findOne` `:9374` | `:9378` |
| `recordPasswordHistory` | `engine.findOne` `:9421` | `:9425` |
| `unlockUser` | `engine.findOne` `:9689` · `engine.find` `:9703` |
`:9691` · `:9705` |
| `enforceSessionControls` | `engine.findOne` `:9748` | `:9752` |
| `enforceConcurrentCap` | `engine.find` `:9832` | `:9837` |
## Report block (ruling `6351993113` item 2)
Base `9dc1f42d50`, head `32f94b8b70`. Every exit code was captured
before any pipe. Builds and suites ran through `os-verify-lock`.
- **Typecheck.** `pnpm --filter @objectstack/plugin-auth typecheck`
(both `tsc` projects and `check:test-typecheck`): **exit 0**, after
`turbo run build --filter='@objectstack/plugin-auth^...'`.
- **ESLint.** `node --stack-size=4000 node_modules/eslint/bin/eslint.js
--no-inline-config packages/plugins/plugin-auth/src/auth-manager.ts`
(the root `lint` script's binary and flags): **exit 0**. The file's key
is gone, so the rule now lints it at `error`, and it flags nothing.
- **The ratchet.**
- With the 12 closers dropped and the baseline untouched, `pnpm
check:query-options-erasure` exits **1**:
`packages/plugins/plugin-auth/src/auth-manager.ts: baselined file is
clean/gone (was 12) — ratchet DOWN: run pnpm check:query-options-erasure
--update and commit the baseline.`
- `pnpm check:query-options-erasure --update` exits 0 (`baseline
updated: 50 non-test site(s) in 15 file(s)`), and the baseline diff is
that one line.
- Re-run: **exit 0**, `ratchet holds: 50 unswept non-test site(s) in 15
file(s), none new, and every file measured parsed`, and `baseline key
set verified against 9dc1f42: no files added`.
- **The bundle.** `pnpm run build` in `packages/plugins/plugin-auth`, at
base and at head, on the same dependency dists. 18 files in `dist/` on
both sides, the same list; 16 of them are byte-identical:
| file | sha256 at base and at head |
|---|---|
| `dist/index.js` |
`6f45fdf90839b0de47090a92e75f0309c0baa628ed838956a2522c2fad40f034` |
| `dist/index.mjs` |
`2cb04450a30b102aac0df38ebded7bd138b16968cf01dd65e11214269e27712f` |
| `dist/index.d.ts` |
`4bc04c66f724c79782493249820b1b7d9bff7c826931ce6b362d325af8797891` |
| `dist/index.d.mts` |
`d70d7d8063053de2d39bd0dbae06423bbe0ef1dcecf5130b867c6f4d79a0c8cd` |
The only files that differ are `index.js.map` and `index.mjs.map`, and
in each only the `mappings` key differs (`version`, `sources` and
`names` are equal).
- These maps carry no `sourcesContent`, which
`check:sourcemap-no-sources-content` enforces. So the cause is not the
one the ruling expected (embedded source text). It is the source
positions.
- Decoded, each map holds the same number of segments on both sides
(67,009 and 67,083). Exactly 12 differ in each map: one on each of the
12 closer lines, at the same generated position, with a source column 7
lower. That is the width of ` as any`, so it is the `)` after the
literal.
- **Tests.** `pnpm exec vitest run --maxWorkers=3` in
`packages/plugins/plugin-auth`: base `Test Files 187 passed (187)`,
`Tests 3525 passed | 10 skipped (3535)`, VERDICT command-exit 0; head
the same counts, VERDICT command-exit 0.
- **Positive control.** One of the 12 restored (`:8856` back to `} as
any);`), nothing else:
- `pnpm check:query-options-erasure` exits **1**:
`packages/plugins/plugin-auth/src/auth-manager.ts: NEW engine
query-options erasure (1 site(s)). … This file is not grandfathered, and
the baseline never grows.`
- The same ESLint command exits **1** at `8854:52`
(`query-options/no-any-erasure`).
- Restored with `git checkout --` afterwards; `git diff HEAD` was empty.
## Gates
- `node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` derives 63 commands for the 2 paths. All 63
ran at `32f94b8b70` after a full `turbo run build`, and all 63 exited 0.
- `--ran`: 63 derived, 63 run, 0 NOT-MEASURED, 0 UNRUN.
- `check-governed-merges.mjs --branch HEAD`: NOT governed, 25 changed
lines.
- Serial constraints are in the claim. Of the open PRs, only #25309
touches `auth-manager.ts`: an import line and the public-config literal
near `:8011`, none of the 12 lines. `git merge-tree` of this branch with
#25309's head is clean.
## Changeset
None: `skip-changeset`, per ruling `6348891160` item 4, as ruling
`6351993113` item 1 reads it. The emitted bundle and declarations are
byte-identical, so this PR publishes nothing.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01LSXBc2GCBwiAL7vV4kWkyr)_
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01LSXBc2GCBwiAL7vV4kWkyr
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 3e51491 commit 67ab712
2 files changed
Lines changed: 12 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8853 | 8853 | | |
8854 | 8854 | | |
8855 | 8855 | | |
8856 | | - | |
| 8856 | + | |
8857 | 8857 | | |
8858 | 8858 | | |
8859 | 8859 | | |
| |||
8864 | 8864 | | |
8865 | 8865 | | |
8866 | 8866 | | |
8867 | | - | |
| 8867 | + | |
8868 | 8868 | | |
8869 | 8869 | | |
8870 | 8870 | | |
| |||
9006 | 9006 | | |
9007 | 9007 | | |
9008 | 9008 | | |
9009 | | - | |
| 9009 | + | |
9010 | 9010 | | |
9011 | 9011 | | |
9012 | 9012 | | |
| |||
9034 | 9034 | | |
9035 | 9035 | | |
9036 | 9036 | | |
9037 | | - | |
| 9037 | + | |
9038 | 9038 | | |
9039 | 9039 | | |
9040 | 9040 | | |
| |||
9185 | 9185 | | |
9186 | 9186 | | |
9187 | 9187 | | |
9188 | | - | |
| 9188 | + | |
9189 | 9189 | | |
9190 | 9190 | | |
9191 | 9191 | | |
9192 | 9192 | | |
9193 | 9193 | | |
9194 | 9194 | | |
9195 | | - | |
| 9195 | + | |
9196 | 9196 | | |
9197 | 9197 | | |
9198 | 9198 | | |
| |||
9375 | 9375 | | |
9376 | 9376 | | |
9377 | 9377 | | |
9378 | | - | |
| 9378 | + | |
9379 | 9379 | | |
9380 | 9380 | | |
9381 | 9381 | | |
| |||
9422 | 9422 | | |
9423 | 9423 | | |
9424 | 9424 | | |
9425 | | - | |
| 9425 | + | |
9426 | 9426 | | |
9427 | 9427 | | |
9428 | 9428 | | |
| |||
9688 | 9688 | | |
9689 | 9689 | | |
9690 | 9690 | | |
9691 | | - | |
| 9691 | + | |
9692 | 9692 | | |
9693 | 9693 | | |
9694 | 9694 | | |
| |||
9702 | 9702 | | |
9703 | 9703 | | |
9704 | 9704 | | |
9705 | | - | |
| 9705 | + | |
9706 | 9706 | | |
9707 | 9707 | | |
9708 | 9708 | | |
| |||
9749 | 9749 | | |
9750 | 9750 | | |
9751 | 9751 | | |
9752 | | - | |
| 9752 | + | |
9753 | 9753 | | |
9754 | 9754 | | |
9755 | 9755 | | |
| |||
9834 | 9834 | | |
9835 | 9835 | | |
9836 | 9836 | | |
9837 | | - | |
| 9837 | + | |
9838 | 9838 | | |
9839 | 9839 | | |
9840 | 9840 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | 43 | | |
45 | 44 | | |
46 | 45 | | |
| |||
0 commit comments