Uh oh!
There was an error while loading. Please reload this page.
Raise default cache retention from 30 to 90 days; bump deps - #406
Conversation
The 30-day default was narrower than the questions people actually ask of the cache (quarter-scale comparisons, month-boundary rollups) and forced a round trip to the org server for work the local cache should answer itself. The local-install default stays 120 days. Wire the two hardcoded duplicates of the default (the `hyp init` --retention-days flag default and the status reporter's fallback) to DEFAULT_RETENTION_DAYS so they cannot drift again. Update LLP 0137 (the pathway-defaults decision), plus 0011 and 0013. Deps: @aws-sdk/client-s3 3.1094.0 -> 3.1096.0, @aws-sdk/credential-provider-ini 3.973.5 -> 3.973.7, @types/node 26.1.1 -> 26.1.2. TypeScript held at 6.0.3; 7.0.2 is a major bump that surfaces 61 type errors and needs its own migration.
README step 3 and docs/PRIVACY.md still described retention as something onboarding asks the user to pick. LLP 0137 removed that question and made the window pathway-scoped, so both now state the real behaviour: 90 days on a team install, 120 on a local-only one, with `hyp init --retention-days <N>` as the override. Co-Authored-By: Claude <noreply@anthropic.com>
philcunliffe
commented
Jul 27, 2026
Verdict: approve with doc fixes appliedReviewed head Back-compat checks out: Fixed in this PR (pushed as 58b0a47)1. minor, 2. minor,
Step 3 now describes the pathway defaults (90 team / 120 local) plus the override, matching LLP 0137 #pathway-defaults. Findings left open (deliberately out of this PR's scope)3. minor, 4. minor, the widened default also widens the default backfill lookback. 5. nit, 6. nit, duplicated constant. 7. nit, 8. info, dependency bumps. Style and conventionClean. No semicolons or em dashes on any added line, no Posted by neutral. Findings 3 to 8 are informational and left for the author to take or leave; nothing here blocks the PR. The head has moved to |
…ault The canonical v2 config sample in the config-model spec was left at default_days: 30 while its structural twin in LLP 0013 moved to 90. The value is incidental to 0010's point (there is no mode flag), but a reader scaffolding a config from the spec would get a window that contradicts the shipped default.
philcunliffe
commented
Jul 27, 2026
Review round 1 — |
| Site | Role |
|---|---|
src/core/cache/retention.js:28 | DEFAULT_RETENTION_DAYS — feeds normalizeRetentionConfig (:512-517) and resolveRetentionDays (commands/backfill.js:817) |
src/core/cli/walkthrough.js:57 | DEFAULT_RETENTION_DAYS — feeds runPickerWalkthrough (:398/:1230/:1250), wizard/pick.js:156,323,343,348 |
src/core/daemon/status.js:945 | was a bare 30; now imports the cache constant — the right one, so hyp status reports what the enforcer actually applies |
src/core/commands/init.js:169,182 | two bare 30s, now imported from walkthrough.js |
hypaware-core/plugins-workspace/claude/src/index.js:384 | the only plugin preset that writes default_days (checked codex/gascity/central/otel — none do) |
Every remaining 30 in the tree is a genuine fixture, not a derived default: 15 smoke flows passing an explicit retention.default_days: 30 and asserting it back (e.g. status_diagnostics.js:424 → :155/:210-212), smokes passing explicit --retention-days 30 (walkthrough_picker_to_first_query.js:192,403), and test/core/init-configured-entry.test.js:44's synthetic renderer report. No missed site.
LOCAL_INSTALL_RETENTION_DAYS = 120 intact (walkthrough.js:58), consumed at exactly one place — the conditional spread at wizard/index.js:135, resolved by pick.js:156 as opts.retentionDefault ?? DEFAULT_RETENTION_DAYS. There is no clamp or comparison between the two, so 90 < 120 is descriptive rather than load-bearing.
LLP discipline satisfied.<a id="pathway-defaults"></a> is live at llp/0137-onboarding-retention-defaults.decision.md:22; all four @ref LLP 0137#pathway-defaults annotations (walkthrough.js:56, wizard/index.js:134, wizard/pick.js:155, test/core/cli/wizard/pick.test.js:132) resolve, with glosses updated. Doc edits landed in 254c066, same commit as the code, and the revision note is dated rather than rewriting history.
Findings
1. NON-BLOCKING — fixed and pushed (f095c30).llp/0010-config-model.spec.md:37: the canonical v2 config example still read "default_days": 30, while this PR updated its structural twin at llp/0013:37. The value is incidental to 0010's point (illustrating that there is no mode flag), but a reader scaffolding a config from the spec would get a window contradicting the shipped default. Changed to 90.
2. NON-BLOCKING — no action taken.package.json:12-43: the exports block was reflowed to multi-line, producing 40 of the file's 46 changed lines, unrelated to the dep bump. Parsed base-vs-head, exports is byte-identical after parse with unchanged key order — the only semantic deltas are the three intended versions. No behavioral risk; noted only because it inflates the diff and will conflict with any concurrent exports edit. Left as the author wrote it.
3. NON-BLOCKING — no fix needed.test/core/cache-retention-maintenance.test.js:53-54 asserts DEFAULT_RETENTION_DAYS === 90, a pure mirror of the constant. Pre-existing shape (it read 30 before), and the PR's other test updates do pin real behavior: wizard/pick.test.js:143-144 pins the value written to the config file on disk, :156-158 pins the 120 local override, walkthrough-backfill.test.js:254 pins the value out of a cancelled-consent run.
Style: clean — no U+2014, no semicolons added, no TypeScript-isms, no inline import() types, no @typedef. There is no lockfile in this repo, so the three exact-pinned dep bumps have no lock to drift.
Verification run
Ran in an isolated detached worktree at 58b0a47:
npm run typecheck— passed, no output.npm test— 2656 pass / 8 fail / 1 skipped. All 8 failures are intest/core/leave-command.test.js(exit 1 vs 0 in thehyp leaveteardown). Rebuilt a second worktree at baseb4233a2and reran: 8/8 fail identically at base — pre-existing, and this PR touches no leave/central code. CI is the authority and is green.npm run smoke -- walkthrough_to_first_query— fails onai_gateway_messages has exactly one row(value=0); identical failure at base, environmental (the gateway capture leg needs outbound traffic this sandbox blocks). The retention assertions this PR changed sit earlier in that flow and passed:hyp statusmentions'90 days', golden configdefault_days: 90,status.renderspanretention_days === 90.- Cold-start check on
status.js's new../cache/retention.jsimport (it pullshyparquet/icebird):cli/core_commands.js:3already statically importscommands/backfill.js, which already importscache/retention.js, so the module was in the CLI graph already. Measureddispatch.jscold import at 128ms with and without.
The head has moved to f095c30 with the doc fix, so the next tick re-reviews at that head.
Retention 30 → 90
The 30-day default was narrower than the questions people actually ask of the cache (quarter-scale comparisons, month-boundary rollups), and it forced a round trip to the org server for work the local cache should answer on its own.
The default lived in more places than one constant. Every site that derives the default changed; explicit test/smoke fixtures were left alone.
src/core/cache/retention.jsDEFAULT_RETENTION_DAYS(cache enforcer)src/core/cli/walkthrough.jsDEFAULT_RETENTION_DAYS(onboarding, team pathway)src/core/commands/init.js--retention-daysflag defaultsrc/core/daemon/status.jshypaware-core/plugins-workspace/claude/src/index.jsThe last two were hardcoded
30s duplicating the default, so they now referenceDEFAULT_RETENTION_DAYSinstead of restating90— that's why the diff touches them structurally rather than as a one-character change.LOCAL_INSTALL_RETENTION_DAYSstays at 120. LLP 0137's rationale (on a local-only install the cache is the only copy of history) still holds, and the ordering 90 < 120 is intact.Docs
Per the living-docs rule, the doc edits land with the code: LLP 0137 (the
#pathway-defaultsdecision, with a dated revision note recording why the window widened), LLP 0011, LLP 0013, README, CONTEXT.md. All@ref LLP 0137#pathway-defaultsannotations still resolve to a live anchor.Deps
@aws-sdk/client-s33.1094.0 → 3.1096.0@aws-sdk/credential-provider-ini3.973.5 → 3.973.7@types/node26.1.1 → 26.1.2TypeScript held at 6.0.3. 7.0.2 is a major bump that surfaces 61 type errors across 23 files (mostly
TS2339, plusTS2345from stricter literal-type inference on schema objects liketype: 'object'). That's a migration, not a version bump, so it's deliberately not folded in here — and 6.0.3 is already the newest 6.x, so there was no safe intermediate. Worth its own branch.Verification
npm test— 2664 pass, 0 failnpm run typecheck— cleanTwo smokes fail, and both fail identically on
master— pre-existing, unrelated to this change:config_load_validate— asink_pair_incompatibleerror-kind assertionwalkthrough_to_first_query—ai_gateway_messages has exactly one row, value=0One note on that second one: this change did initially break it earlier in the flow, at a golden config fixture. That's fixed here — the golden and two derived status assertions now expect 90 — and it fails at exactly master's failure point. Confirmed by stashing and diffing the failing assertion, not just the exit code; the two failures were indistinguishable at the exit-code level but were not the same failure.