mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-14 06:40:50 +00:00
docs(mood): state the validation's real leak boundary, drop the unused weekday floor, correct two comments
Four honesty fixes with no behaviour change to the math. The validation header claimed more than it proves. The ridge FIT is out-of-sample and no training fold sees ahead — that holds. But feature SELECTION and per-user standardisation both run over the whole window before the split, a small documented optimism (measured at about one part in sixty on the error). The header now says exactly what is and is not leak-free, and says to nest the screening if the feature set ever grows or the optimism is ever measured larger. The per-weekday observation floor had no consumer: no weekday board is built on this fit, the forecast only publishes seasonalUnlocked and leaves the weekday view to the insights page, which has its own floors. Removed rather than left as a number nothing reads, with a note to bring it back alongside such a board. Two comments were wrong and are now true: the route's parameter is declared for the exported type, not to steer a method check the wrapper resolves from the Next.js request with a GET fallback; and the label surface imports the key parser from feature-keys.ts, not features.ts. And the write-surface guard now states its own structural blind spot, the way the session-surface guard does: the wipe path deletes this table through a dynamically-resolved delegate the literal matcher cannot see, which is why that deletion is correctly not counted as a writer. The Coach staleness fixture moves above the forecast floor, because the read path now refuses below it: a one-entry account correctly gets an absence rather than the present forecast that case exercises.
This commit is contained in:
1 parent
d58edc5deb
commit
75c43c74bc
7 files changed
+81
-41
No files matched your search
@@ -36,13 +36,15 @@ import { requireModuleEnabled } from "@/lib/modules/gate";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
// The request is declared although the handler reads nothing off it: the
|
||||
// wrapper takes the method and the path from it for the wide event, and
|
||||
// `requireRecordAuth` reads the method to decide whether a `read` declaration
|
||||
// really is a read. A handler with no parameter types as zero-arity, and a
|
||||
// caller that then omits the request turns every method check into "unknown",
|
||||
// which escalates a read to a write and refuses a delegate for the wrong
|
||||
// reason.
|
||||
// The parameter is declared although the handler body reads nothing off it,
|
||||
// and the reason is the exported type rather than the runtime. `apiHandler`
|
||||
// infers the type of `GET` from this callback, so a zero-argument handler
|
||||
// would type `GET` as taking no arguments — and Next.js, and the integration
|
||||
// tests, call it WITH the request. The wide event's method and path, and the
|
||||
// read-vs-write check `requireRecordAuth` runs, both come from the request the
|
||||
// wrapper receives from Next.js (not from this parameter), and both fall back
|
||||
// to `GET` when no request is present — so an absent request keeps a read a
|
||||
// read rather than escalating it.
|
||||
export const GET = apiHandler(async (_request: NextRequest) => {
|
||||
// `record`: see the file header. A scoped grant is refused here by
|
||||
// construction rather than served a narrowed payload.
|
||||
|
||||
Reference in new issue
Block a user