Repository navigation
Description
repo:objectstack#1 · zhuangjianguo · session_01QsR2jTsdScTh3o2fSjbxSz
Filing gate: ③ follow-up of a delivery in review. #38184 (PR superseding #38255) states every auth.* key whose running value comes from the deployment's declaration, except the rate-limit pair. Contract review 7255864152 ③ accepted not stating the pair on the declared-default seam (no single number is true) and escalated the residue; L1 7255889020 item 4 routes it to this card so Fixes #38184 can close the rest.
Defect
With nothing stored for rate_limit_max / rate_limit_window_seconds, GET /api/settings/auth answers { value: 10, source: 'default' } / { value: 60, source: 'default' } (the manifest defaults in packages/services/service-settings/src/manifests/auth.manifest.ts, keys rate_limit_max and rate_limit_window_seconds). What runs is something else:
- Nothing declared: the auth instance gets no
rateLimitblock (packages/plugins/plugin-auth/src/auth-manager-auth-instance.ts, the ADR-0069 D2 spread), so the auth library's own defaults run: its own per-path rules, enabled only in production. - A declared
rateLimit(for example{ enabled: true, window: 120, max: 5 }): that global pair runs whole, with nocustomRules, where a saved setting writes per-endpointcustomRulesfor sign-in, sign-up, password reset, invitation accept and the phone OTP paths (auth-plugin.ts, therate_limit_maxbranch of the settings pass).
So the page shows a per-endpoint cap of 10 per 60 s that no request is held to, in both cases. Measured in #38184's base table (PR #38255 body, row rate_limit_max / rate_limit_window_seconds): declared 5 / 120, resolved 10 / 60, running the declared global pair.
reach: GET /api/settings/auth (the Setup → Authentication page's read), nothing stored, any deployment.
Options (seat or maintainer decides; this card does not pick)
- A. State it in the live-status banner: with nothing stored, a statement under the rate-limit group that the auth library's own per-path limits (or the declared global pair) run until a value is saved. No value change, so no Clause-② narrowing on the read surface.
- B. State "nothing" on the seam: register a declared default that answers no value for both keys, so the fields read empty with nothing stored, plus help text saying what runs. Changes a published response's value for every deployment (narrowing,
!). - C. Accept the residue by ruling, and change only the specifier description to say the default runs the library's per-path rules until saved.
Acceptance (whichever option): a case on a real AuthPlugin over the real SettingsService that reads the page with nothing stored, declared and undeclared, and asserts what the page says against what the auth instance receives.
Dedupe words: rate_limit_max manifest default, rateLimit customRules settings, auth rate limit live status.
Prerequisite: the #38184 PR merged (it holds AUTH_KEYS_NOT_DECLARED, whose pin names these two keys).
Activity
objectstack-fleet commentedon Nov 29, 2026
triage#1 · zhuangjianguo · session_01QsR2jRH2X4frz9bBiZHNk4
Triage: lands in
service-settings' auth manifest andplugin-auth's rate-limit wiring (the settings door states the pair it does not run) · area:cloud · domain:server · Bug · p3 · pm:queue · size S. Rationale: the admin settings page shows10 / 60as the running default while the auth library's own rules run; a wrong reading on a rarely-changed operator setting, with the fix and its test in this repository. The filing seat's area and grade stand.fix(plugin-auth)!: Setup → Authentication shows what the deployment r…
objectstack-fleet commentedon Dec 3, 2026
repo:cloud@zhuangjianguo · zhuangjianguo · session_01TsNV8Bsjqmw7aXCo2QuLU1
Claim: PM loop round 8 · 2026-12-03T11:14Z
Ruling-ref: the maintainer, in the cloud seat's session, put objectstack's open
pm:queue+area:cloudcards in this seat's lane: 「这些任务也应该归你处理 is:issue state:open label:pm:queue label:priority:p2,priority:p1 label:area:cloud」, 「objectstack 仓库的 …」. This p3 is taken because no p1/p2 in the lane is ready (the open cloud p2s await triage).Option: A, which the card leaves to "seat or maintainer". The live-status banner states what runs with nothing stored. No value changes, so no Clause-② narrowing on the read surface. B narrows a published response for every deployment, and C leaves the page showing a cap nobody is held to.
Session:
session_01TsNV8Bsjqmw7aXCo2QuLU1Account:
zhuangjianguoBranch:
claude/issue-38608-rate-limit-statusWorktree:
objectstack-issue-38608Domain:
domain:serverSeat:
repo:cloud@zhuangjianguoFile surface:
packages/plugins/plugin-auth/src/auth-settings-live-status.ts,packages/plugins/plugin-auth/src/auth-settings-declared-defaults.ts,packages/plugins/plugin-auth/src/auth-plugin.ts,packages/services/service-settings/src/manifests/auth.manifest.tsContainer & model:
S,mode:subagent,model: default (dispatch-gates --tier: no mandate),effort: mediumClause-②: no
Metadata-protocol: none
Responsibility: the Setup → Authentication page's rate-limit pair with nothing stored | none | administrators who read 10 / 60 as the running cap
Thread-read: 7258143012
Premise: holds (
AUTH_KEYS_NOT_DECLAREDonmainf80864150estill names the pair; #38184's PR is merged)objectstack-fleet commentedon Dec 3, 2026
repo:cloud@zhuangjianguo · zhuangjianguo · session_01TsNV8Bsjqmw7aXCo2QuLU1
os-dev-report
{ "issue": 38608, "status": "done", "branch": "claude/issue-38608-rate-limit-status", "pr": "https://github.com/objectstack-ai/objectstack/pull/39329", "session": "session_01TsNV8Bsjqmw7aXCo2QuLU1", "premise_still_valid": true, "summary": "Option A as the seat chose it. While neither rate_limit_max nor rate_limit_window_seconds resolves from anything but the default (the pass's own isExplicit test), Setup → Authentication's live-status banner now carries an info statement: the cap the fields show (10 / 60) is not applied, and what runs instead is one of three things. With nothing declared, the auth library's own per-path limits, in production only. With a declared rateLimit, that pair, as the library reads it (window || 10, max || 100, production only unless enabled: true), on every path without its own rule. With rateLimit declared enabled: false, rate limiting is off. The statement ends with what a save does. The copy is in all 11 languages, and the statement rides last in combineAuthLiveStatus, so warnings keep the title. No value or source the read returns changes. The pair stays out of AUTH_DECLARED_DEFAULTS, and its AUTH_KEYS_NOT_DECLARED reasons and the module header now point at the banner. The seam has one placement, the page-head banner, so the statement names the Anti-abuse group rather than sitting under it; placing it under the group would be a response-shape change. Since nothing saved is the default state, nearly every deployment's auth page now shows this info banner until a limit is saved. Existing pins that asserted no banner now pin this exact statement.", "tests": "Red first: on test commit 246f2df867, vitest on src/auth-settings-live-status.test.ts gave 15 failed / 23 passed. Green on the fix: 38/38. The real AuthPlugin + SettingsService + settings route cases read the built auth instance (options.rateLimit, and $context.rateLimit for the library's reading). (1) Nothing declared: fields 10/60 default, the instance gets no pair or customRules, resolved max/window are not 10/60, and the page states the library rules (en + zh-CN). (2) Declared {enabled:true,window:120,max:5}: the statement's numbers are taken from $context (5/120, always on). (3) Declared without enabled: production only, with $context enabled false. (4) Declared enabled:false: the off statement. (5) CONTROL: after saving 7/30, customRules['/sign-in/email'] is {window:30,max:7}, the page reads 7/30 global, and the statement is gone. With one key cleared, it runs at 60/7, still with no statement. With both cleared, the declared pair and the statement return. Ablation used scripts/ablation-replace.mjs; each leg restored to the HEAD blob with git diff HEAD empty, and no build was involved (relative src imports). Deleting the saved-value gate: 2 failed. declared: undefined in the provider: 5 failed. productionOnly forced false: 2 failed. At the merge head 4a17206b1b: plugin-auth typecheck (including check:test-typecheck) exit 0, and 10 neighbouring files (auth-settings-*, auth-plugin, audience-posture-setting, sign-in-method-floor, settings-copy-locale, organization-default-currency) gave 307/307 passed. NOT MEASURED: the full @objectstack/plugin-auth suite (run killed inside the foreground window, exit 124), left to Test Core.", "gates": "At head 4a17206b1b, dispatch-gates --commands derived 79 families. Run with exit codes captured before any pipe, then --ran: 75 run (all exit 0), 4 NOT-MEASURED, 0 UNRUN, exit 0. The 4 NOT-MEASURED are repo-wide scans killed by a 150-240 s per-gate timeout on the shared box, left to CI: check-comment-mask-corpus, check:query-options-erasure, check:slot-lookup, check:type-check-debt. check:dts-closure and check:dual-build-cjs-loads first went red because @objectstack/organizations/dist had no .d.ts in this worktree; that package is not in the diff. After rebuilding it, both exit 0. check:nul-bytes exit 0. PR check-runs were not yet read when this report was written; CI convergence is the seat's.", "mcp_calls": "0", "api_writes": "2 — fleet-write relay stroke pr_create (POST /repos/objectstack-ai/objectstack/pulls, draft forced; POST /issues/39329/assignees zhuangjianguo) and this os-dev-report comment via post-stamped.mjs (POST /issues/38608/comments); plus git push of the branch (not REST)", "classifier_refusals": [], "open_questions": [], "security_findings": "none", "out_of_scope_findings": [ "carrier: none · noted, not filed — precision, not a defect: with a declared global rateLimit pair, better-auth's built-in special rules (3 per 10 s on /sign-in*, /sign-up*, /change-password, /change-email; 3 per 60 s on /request-password-reset and similar) still override the global pair on those paths unless the declaration's own customRules cover them. The card's 'that global pair runs whole' is therefore approximate. The banner text says 'on every path without a rule of its own' to stay true. Recorded in the PR Acceptance notes." ] }