Repository navigation
Commit e474853
* wip: internal:true on sys_session.token
* test+changeset for #7823
* test: add session lifecycle arm
* fix(security): relocate the internal-field write-response strip to the generic-data-path ingress, and route better-auth session readbacks through resolveInternalField (#7823)
A-prime + compose, per the 2026-08-13 maintainer ruling:
- objectql: the engine's two omitInternalFields write-response sites are
removed — engine write results stay whole, so better-auth's createWithHooks
reads the minted sys_session.token back and signIn/signUp work. The generic
READ-path strip is unchanged.
- metadata-protocol: omitInternalFieldsFromWriteResponse (single exported
helper) applied by every *Data write face — createData / cloneData /
updateData / createManyData / insertManyData / updateManyData / batchData —
plus a tripwire test that enumerates the *Data surface, fails on any face a
flagged sentinel reaches, and fails on any new face with no recipe.
- rest: the cross-object batch update mouth (direct ql.update) applies the
same strip through the protocol instance (dormant today — no flagged object
grants bulk — wired so the guarantee does not depend on that).
- plugin-auth: session rows read back through the better-auth adapter get
token re-attached via Engine.resolveInternalField (#8118's accessor), so
revoke-other-sessions / sliding refresh / expired cleanup act again while
the generic data API keeps returning token-less rows. Fail-closed when a
stripped row meets an engine without the accessor.
- dogfood: revoke-other-sessions pinned on the other session's liveness, and
expired-session cleanup pinned on the row, not the status code.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RDTnVvsgA6cUZ4xFVtPZRy
* test(objectql): re-judge the two engine-level write-response pins under A-prime (#7823)
They pinned exactly the limb the ruling relocates — the engine omitting
internal fields from its own insert/update results, which is what broke
signIn. Replaced wholesale (fixture-triage rule): they now pin the LIVENESS
half — engine write results KEEP the flagged value — so re-adding an
engine-level strip (the regression that broke authentication) goes red here,
while the external-body guarantee is pinned at the ingress by the tripwire
and the dogfood suites.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RDTnVvsgA6cUZ4xFVtPZRy
* fix(metadata-protocol): pin the tripwire fixture's delete/update to the shared dispatch predicate (#7823)
check:engine-double-contract flagged makeSentinelEngine()'s delete()/update()
as unpinned engine doubles — exactly the toolchain trap AGENTS.md names. Route
both through assertEngineDeleteDispatch/assertEngineUpdateDispatch from
@objectstack/metadata-core, the same pattern protocol.batch-verb-driver-text.test.ts
already uses. No behavioural change to the tripwire itself.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RDTnVvsgA6cUZ4xFVtPZRy
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 79021fc commit e474853
13 files changed
Lines changed: 1396 additions & 30 deletions
File tree
- .changeset
- packages
- metadata-protocol/src
- objectql/src
- platform-objects/src/identity
- plugins/plugin-auth/src
- qa/dogfood/test
- rest/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
8 | 16 | | |
9 | 17 | | |
10 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
7625 | 7626 | | |
7626 | 7627 | | |
7627 | 7628 | | |
| 7629 | + | |
| 7630 | + | |
| 7631 | + | |
| 7632 | + | |
| 7633 | + | |
| 7634 | + | |
| 7635 | + | |
| 7636 | + | |
7628 | 7637 | | |
7629 | 7638 | | |
7630 | 7639 | | |
| |||
7699 | 7708 | | |
7700 | 7709 | | |
7701 | 7710 | | |
| 7711 | + | |
| 7712 | + | |
| 7713 | + | |
| 7714 | + | |
| 7715 | + | |
| 7716 | + | |
7702 | 7717 | | |
7703 | 7718 | | |
7704 | 7719 | | |
| |||
7797 | 7812 | | |
7798 | 7813 | | |
7799 | 7814 | | |
| 7815 | + | |
| 7816 | + | |
| 7817 | + | |
| 7818 | + | |
| 7819 | + | |
| 7820 | + | |
| 7821 | + | |
| 7822 | + | |
| 7823 | + | |
| 7824 | + | |
7800 | 7825 | | |
7801 | 7826 | | |
7802 | 7827 | | |
| |||
7832 | 7857 | | |
7833 | 7858 | | |
7834 | 7859 | | |
| 7860 | + | |
| 7861 | + | |
| 7862 | + | |
| 7863 | + | |
| 7864 | + | |
| 7865 | + | |
| 7866 | + | |
| 7867 | + | |
| 7868 | + | |
| 7869 | + | |
| 7870 | + | |
| 7871 | + | |
| 7872 | + | |
| 7873 | + | |
| 7874 | + | |
| 7875 | + | |
7835 | 7876 | | |
7836 | 7877 | | |
7837 | 7878 | | |
| |||
8432 | 8473 | | |
8433 | 8474 | | |
8434 | 8475 | | |
| 8476 | + | |
8435 | 8477 | | |
8436 | 8478 | | |
8437 | 8479 | | |
| |||
8447 | 8489 | | |
8448 | 8490 | | |
8449 | 8491 | | |
| 8492 | + | |
8450 | 8493 | | |
8451 | 8494 | | |
8452 | 8495 | | |
| |||
8478 | 8521 | | |
8479 | 8522 | | |
8480 | 8523 | | |
| 8524 | + | |
8481 | 8525 | | |
8482 | 8526 | | |
8483 | 8527 | | |
| 8528 | + | |
8484 | 8529 | | |
8485 | 8530 | | |
8486 | 8531 | | |
8487 | 8532 | | |
| 8533 | + | |
8488 | 8534 | | |
8489 | 8535 | | |
8490 | 8536 | | |
| |||
8708 | 8754 | | |
8709 | 8755 | | |
8710 | 8756 | | |
| 8757 | + | |
| 8758 | + | |
| 8759 | + | |
| 8760 | + | |
| 8761 | + | |
| 8762 | + | |
8711 | 8763 | | |
8712 | 8764 | | |
8713 | 8765 | | |
| |||
8764 | 8816 | | |
8765 | 8817 | | |
8766 | 8818 | | |
| 8819 | + | |
| 8820 | + | |
| 8821 | + | |
| 8822 | + | |
| 8823 | + | |
| 8824 | + | |
| 8825 | + | |
| 8826 | + | |
| 8827 | + | |
8767 | 8828 | | |
8768 | 8829 | | |
8769 | 8830 | | |
| |||
8824 | 8885 | | |
8825 | 8886 | | |
8826 | 8887 | | |
| 8888 | + | |
| 8889 | + | |
| 8890 | + | |
| 8891 | + | |
8827 | 8892 | | |
8828 | 8893 | | |
8829 | 8894 | | |
| |||
8857 | 8922 | | |
8858 | 8923 | | |
8859 | 8924 | | |
| 8925 | + | |
8860 | 8926 | | |
8861 | 8927 | | |
8862 | 8928 | | |
| |||
0 commit comments