Commit fa85759
fix(plugin-hono-server):
* test(plugin-hono-server): reproduce the always-null /auth/me/localization answer
Widens the #14788 fixture so the tenant can configure `localization.timezone`
and `localization.currency` rows (the endpoint reads all three keys in one
`$in` query, so the double now answers whichever the fixture sets), and adds
five cases for the resolved regional defaults.
Measured against unchanged source: 4 failed | 9 passed. An authenticated
caller configured with `Asia/Shanghai` / `CNY` is answered
`currency: null, timezone: null` — the defect, reproduced here rather than
inherited from the card.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D47qPfEWVPmhguWgBZCi5N
* fix(plugin-hono-server): resolve the /auth/me/localization regional defaults instead of answering null
The handler read `currency` / `timezone` off the request ExecutionContext,
citing ADR-0053 — but `makeExecutionContextResolver`, the resolver that serves
this surface, is a hand-rolled envelope that assigns neither. Both were
therefore `undefined` on every request and the `?? null` answered `null` to
every authenticated caller, whatever the `localization` settings said.
All three values now come from ONE reading of `resolveLocalizationContext`,
the same cascade the dispatcher's shared assembler fills `execCtx` from, so
the two faces agree by construction rather than by comment. `locale` keeps its
three #14788 rungs and its answers are unchanged; what changed underneath is
that the cascade is read even when rung 1 or 2 wins, because the other two
values need it whichever rung answers the language. The identity read and the
settings read are independent and now run concurrently — the console races
this endpoint against a 500 ms budget on a first visit.
The #14788 pin asserted `timezone: null` as the contract; it was pinning the
defect, and it now asserts the corrected one. `currency: null` in that fixture
is UNCHANGED and still correct: the cascade gives `timezone` a floor (`UTC`)
and `currency` none. The platform checklist's "nulls legal" clause is
rewritten to that asymmetry.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D47qPfEWVPmhguWgBZCi5N
* test(plugin-hono-server): make the localization pin's ObjectQL double honour `where` and the caller's bound
The double answered by object name and dropped `opts.limit`, so neither read it
serves could tell a bounded read from an unbounded one — and both carry a bound
(`sys_user` at 1, the grouped `sys_setting` `$in` read at 10). It now draws from
a row table, filters with a `where` matcher that refuses any operator it does not
implement, and applies the bound BY PRESENCE (`typeof opts?.limit === 'number'`)
AFTER the filter.
`check:objectql-double-limit` could not grade the old double at all: its deepest
binding strategy stubs every non-function declaration, the counter
`let sysUserReads = 0` became the gate's row-stub Proxy, and `++sysUserReads`
raised `TypeError: Cannot convert object to primitive value` — reported as
UNJUDGED, which the gate treats as debt rather than a skip. The double now seats
on the gate's control probe at the earlier binding strategy, so it is graded
CONFORMING (limit 3 -> 3 rows, 5 -> 5, 0 -> 0 of 7 matches) instead of throwing.
No baseline entry was added; the ledger never grows.
What the file ASSERTS is unchanged — all 13 cases pass, including the corrected
`timezone`/`currency` contract.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D47qPfEWVPmhguWgBZCi5N
---------
Co-authored-by: Claude <noreply@anthropic.com>/auth/me/localization resolves the regional defaults instead of answering null to every caller (#15745)1 parent 1697831 commit fa85759
4 files changed
Lines changed: 228 additions & 40 deletions
File tree
- .changeset
- docs/qa/platform-checklist/areas
- packages/plugins/plugin-hono-server/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2572 | 2572 | | |
2573 | 2573 | | |
2574 | 2574 | | |
2575 | | - | |
| 2575 | + | |
2576 | 2576 | | |
2577 | | - | |
| 2577 | + | |
2578 | 2578 | | |
2579 | 2579 | | |
2580 | 2580 | | |
| |||
Lines changed: 135 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
30 | 47 | | |
31 | 48 | | |
32 | 49 | | |
| |||
61 | 78 | | |
62 | 79 | | |
63 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
64 | 85 | | |
65 | 86 | | |
66 | 87 | | |
| |||
73 | 94 | | |
74 | 95 | | |
75 | 96 | | |
76 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
77 | 124 | | |
78 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
79 | 144 | | |
80 | 145 | | |
81 | 146 | | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
90 | 156 | | |
91 | 157 | | |
92 | 158 | | |
| |||
130 | 196 | | |
131 | 197 | | |
132 | 198 | | |
133 | | - | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
134 | 202 | | |
135 | 203 | | |
136 | 204 | | |
| |||
215 | 283 | | |
216 | 284 | | |
217 | 285 | | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
0 commit comments