Summary
PR #17420 (card #16952) gives the exported ImportProtocolLike a real request type, so implementors are finally held to the dialect runImport sends. ⚠️ The one real in-repo implementor is not held to it, because it annotates its own parameter any:
packages/plugins/plugin-auth/src/admin-import-users.ts
async findData(args: any) { … }
An explicit parameter annotation wins over the contextual type. So admin-import-users.ts compiles, happens to read the right keys today, and is ⛔ not type-checked against the contract it implements. The fix is one deleted annotation.
Why this matters more than a style nit
⭐ This implementor is the one the class actually bit. Recorded on #16952 by the domain:cli seat when #16950 landed: before that PR, this file read args?.query?.$filter ?? {}; the runner moved to the canonical spelling, the read became undefined, and the ?? {} fallback degraded key-matching into match-everything — the dedupe probe on POST /api/v1/auth/admin/import-users stopped distinguishing records and would update the wrong users. Nothing caught it, because the parameter was any.
⇒ #16952 was filed to close that hole. It closes it for every future implementor, and leaves the one that already fell in exactly as exposed as before. ⛔ That is not a defect in PR #17420 — see scope below — but it means the card's protective value is not yet realised where it was earned.
Measured
⚠️ Attribution: the readings below were taken by the os-dev agent delivering #16952 and are quoted from its report on that card. This seat has NOT re-run them. Whoever grades this should re-verify.
pnpm --filter @objectstack/plugin-auth exec tsc --noEmit → exit 0 with the narrowed interface in place (an any parameter stays bivariant with a narrower signature).
- Reverse-verified, so the green is a reading and not a dead check: appending a probe that carries a key the new type refuses reddens the same run —
TS2353 '$filter' does not exist in type 'QueryInput' at src/admin-import-users.ts(620,32). Restored by blob hash, git diff HEAD empty.
⇒ The type is live and does refuse wrong keys; the annotation is what opts this file out.
Re-check command:
grep -n "findData(args" packages/plugins/plugin-auth/src/admin-import-users.ts
Expect an explicit : any annotation. If it is gone, this card is already fixed.
Why PR #17420 correctly did not do it
packages/plugins/plugin-auth/** is domain:services, and the #16952 dispatch made it read-only with an explicit instruction to stop and report rather than widen. The delivering agent measured the consequence, left the file untouched, stated it in the ImportProtocolLike docblock and in the changeset's migration line, and handed it up. ⇒ Correct behaviour; this card is the hand-off it produced.
Deliverable (⛔ not decided here — routing is triage's)
Delete the : any annotation on findData (and any sibling member so annotated) in packages/plugins/plugin-auth/src/admin-import-users.ts, letting the contextual type from ImportProtocolLike apply, then fix whatever the compiler then reports. Expected to be small — the file already reads the canonical keys since #16950.
⚠️ Blocked until PR #17420 merges — the contextual type does not exist on main before then. Blocked-by: #16952
Not duplicates (checked, including closed)
Searched for this exact shape; the only hit was #16952 itself, which is this card's parent and explicitly scoped this file out.
Filed by the domain:cli execution PM seat (#6024, session session_01DapQyvYrFb1MxSYe7BL2nt) out of PR #17420's acceptance. ⛔ Not graded, no domain:*, no priority, no assignee — that is triage's. ⚠️ Suggested lane for triage: the fix lands in packages/plugins/plugin-auth ⇒ domain:services.
Generated by Claude Code
Summary
PR #17420 (card #16952) gives the exported⚠️ The one real in-repo implementor is not held to it, because it annotates its own parameter
ImportProtocolLikea real request type, so implementors are finally held to the dialectrunImportsends.any:An explicit parameter annotation wins over the contextual type. So
admin-import-users.tscompiles, happens to read the right keys today, and is ⛔ not type-checked against the contract it implements. The fix is one deleted annotation.Why this matters more than a style nit
⭐ This implementor is the one the class actually bit. Recorded on #16952 by the
domain:cliseat when #16950 landed: before that PR, this file readargs?.query?.$filter ?? {}; the runner moved to the canonical spelling, the read becameundefined, and the?? {}fallback degraded key-matching into match-everything — the dedupe probe onPOST /api/v1/auth/admin/import-usersstopped distinguishing records and would update the wrong users. Nothing caught it, because the parameter wasany.⇒ #16952 was filed to close that hole. It closes it for every future implementor, and leaves the one that already fell in exactly as exposed as before. ⛔ That is not a defect in PR #17420 — see scope below — but it means the card's protective value is not yet realised where it was earned.
Measured
os-devagent delivering #16952 and are quoted from its report on that card. This seat has NOT re-run them. Whoever grades this should re-verify.pnpm --filter @objectstack/plugin-auth exec tsc --noEmit→ exit 0 with the narrowed interface in place (ananyparameter stays bivariant with a narrower signature).TS2353 '$filter' does not exist in type 'QueryInput'atsrc/admin-import-users.ts(620,32). Restored by blob hash,git diff HEADempty.⇒ The type is live and does refuse wrong keys; the annotation is what opts this file out.
Re-check command:
Expect an explicit
: anyannotation. If it is gone, this card is already fixed.Why PR #17420 correctly did not do it
packages/plugins/plugin-auth/**isdomain:services, and the #16952 dispatch made it read-only with an explicit instruction to stop and report rather than widen. The delivering agent measured the consequence, left the file untouched, stated it in theImportProtocolLikedocblock and in the changeset's migration line, and handed it up. ⇒ Correct behaviour; this card is the hand-off it produced.Deliverable (⛔ not decided here — routing is triage's)
Delete the
: anyannotation onfindData(and any sibling member so annotated) inpackages/plugins/plugin-auth/src/admin-import-users.ts, letting the contextual type fromImportProtocolLikeapply, then fix whatever the compiler then reports. Expected to be small — the file already reads the canonical keys since #16950.mainbefore then.Blocked-by: #16952Not duplicates (checked, including closed)
Searched for this exact shape; the only hit was #16952 itself, which is this card's parent and explicitly scoped this file out.
Filed by the⚠️ Suggested lane for triage: the fix lands in
domain:cliexecution PM seat (#6024, sessionsession_01DapQyvYrFb1MxSYe7BL2nt) out of PR #17420's acceptance. ⛔ Not graded, nodomain:*, no priority, no assignee — that is triage's.packages/plugins/plugin-auth⇒domain:services.Generated by Claude Code