Skip to content

refactor(memory-wiki): share freshness result construction - #146935

Merged
vincentkoc merged 1 commit into
mainfrom
refactor/wiki-freshness-results-20260913
Sep 13, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
refactor/wiki-freshness-results-20260913

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 13, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Wiki freshness classification repeats the same result fields for fresh, aging, and stale timestamps.

User Impact

No user-visible behavior changes.

Why This Change Was Made

Select the level using the existing 30/90-day thresholds and construct the result once. Production changes: −10 lines; tests +37.

Evidence

  • Added public page/claim boundary cases for 29/30/89/90 days and future timestamps. Actual before/after modules matched 32 page and 16,384 claim/evidence cases using the actual pure normalization helpers. All 11 claim-health cases passed in hosted job103710915379.
  • Independent source review and fresh P2 autoreview are clean. Targeted formatting and the normal commit hook passed with installed oxfmt 0.65.0.
  • Exact-head CI passed at 646fe5e3cce26654e7b9ce7ab0c5afc83466246f (attempt1), including type/lint/format gates. The borrowed local dependency install remains incompatible; package-backed proof is hosted.

Compatibility proof requested in review: this is a read-only result-construction change. The WikiFreshness fields, unknown result, 30/90-day thresholds, future-date clamp and claim/evidence/page timestamp selection are unchanged. No persisted schema, embedding metadata, store write or migration code changes. The 32 page/16,384 claim comparisons and 11 actual hosted cases verify the unchanged result contract. A data migration is not applicable because the stored data format is untouched.

@clawsweeper

clawsweeper Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@vincentkoc vincentkoc self-assigned this Sep 13, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review September 13, 2026 10:36
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 13, 2026
@clawsweeper

clawsweeper Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 13, 2026, 7:53 AM ET / 11:53 UTC (Revision 2).

ClawSweeper review

What this changes

The PR consolidates Memory Wiki freshness result construction and adds page/claim tests for age thresholds and future timestamps without changing behavior.

Merge readiness

⛔ Blocked before merge - 1 item remains

The refactor is correct and remains absent from inspected main. The earlier migration-proof blocker does not apply: the patch preserves the result contract and changes no persisted data. No actionable findings remain.

Priority: P3
Reviewed head: 646fe5e3cce26654e7b9ce7ab0c5afc83466246f

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, behavior-preserving cleanup with useful boundary coverage and successful pinned-head CI.
Proof confidence 🌊 off-meta tidepool Not applicable: The MEMBER-authored internal refactor is exempt from the external-contributor proof gate. Page and claim boundary tests exercise the changed helper; reported equivalence checks and verified CI are supplemental, and no authority-sensitive behavior changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The MEMBER-authored internal refactor is exempt from the external-contributor proof gate. Page and claim boundary tests exercise the changed helper; reported equivalence checks and verified CI are supplemental, and no authority-sensitive behavior changes.
Evidence reviewed 7 items Behavior-preserving introduced change: The pinned introduced production diff replaces repeated return objects with the same ordered stale/aging/fresh comparisons and one return object. Timestamp parsing, unknown handling, future-date clamping, field values, and timestamp selection remain unchanged.
Main and release still contain repeated construction: Full module inspection at fetched main and v2026.9.4 found the original three return objects. This cleanup has not already landed in either inspected revision.
Current-main comparison: Current main retains the same freshness contract and duplicated result construction.
Findings None None.
Security None None.

How this fits together

Memory Wiki classifies page and claim timestamps by age. These classifications feed wiki search ranking, health reports, and lint warnings.

flowchart TD
  A[Page timestamps] --> C[Select relevant timestamp]
  B[Claim and evidence timestamps] --> C
  C --> D[Classify age or unknown]
  D --> E[Shared freshness result]
  E --> F[Search ranking]
  E --> G[Reports and warnings]
Loading

Before merge

  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Source -10, Tests +37. Total +27 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 7 17 -10
Tests 1 38 1 +37
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 45 18 +27

Review metrics

None.

Stored data model

Persistent data-model change detected: vector/embedding metadata: extensions/memory-wiki/src/claim-health.ts. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Keep freshness policy in its existing helper with one result-construction path and preserved boundary coverage.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this PR claims no behavioral defect; source comparison supports equivalent results. No target code or tests were executed during review.

Is this the best way to solve the issue?

Yes. Selecting the level before constructing the unchanged result removes duplication within the existing owner without adding an API or migration.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 59773963d180.

Labels

Label justifications:

  • P3: This is a small internal cleanup with unchanged user-visible behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The MEMBER-authored internal refactor is exempt from the external-contributor proof gate. Page and claim boundary tests exercise the changed helper; reported equivalence checks and verified CI are supplemental, and no authority-sensitive behavior changes.

Evidence

What I checked:

  • Behavior-preserving introduced change: The pinned introduced production diff replaces repeated return objects with the same ordered stale/aging/fresh comparisons and one return object. Timestamp parsing, unknown handling, future-date clamping, field values, and timestamp selection remain unchanged. (extensions/memory-wiki/src/claim-health.ts:71, 646fe5e3cce2)
  • Main and release still contain repeated construction: Full module inspection at fetched main and v2026.9.4 found the original three return objects. This cleanup has not already landed in either inspected revision. (extensions/memory-wiki/src/claim-health.ts:80, 3a9d69db306c)
  • Current-main comparison: Current main retains the same freshness contract and duplicated result construction. (extensions/memory-wiki/src/claim-health.ts:71, 59773963d180)
  • Boundary coverage: The complete test module includes five new table cases covering 29/30/89/90 days and a future timestamp through both existing page and claim entrypoints. Existing cases protect evidence timestamp precedence, page fallback, and malformed timestamps; no test-only production seam is added. (extensions/memory-wiki/src/claim-health.test.ts:173, 646fe5e3cce2)
  • Compatibility follow-up resolved: The supplied complete PR body explicitly addresses the previous review's migration request. Source inspection confirms this is pure result construction: no schema, storage writer, configuration, exported API signature, or authority changes occur. A migration or fresh-install/upgrade campaign is therefore not applicable. (extensions/memory-wiki/src/claim-health.ts:80, 646fe5e3cce2)
  • Verified CI and reported supplemental validation: GitHub confirms run 34752317756 completed successfully at the pinned head. The captured body additionally reports 32 page and 16,384 claim/evidence equivalence comparisons and 11 hosted test cases; those execution counts were not independently rerun during this read-only review. (646fe5e3cce2)

Likely related people:

  • ly-wang19: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-13T10:43:01.587Z sha 646fe5e :: blocked before merge. :: none

@vincentkoc
vincentkoc merged commit 060e856 into main Sep 13, 2026
166 checks passed
@vincentkoc
vincentkoc deleted the refactor/wiki-freshness-results-20260913 branch September 13, 2026 13:07
vincentkoc added a commit that referenced this pull request Sep 13, 2026
* temp/pr-145950: (101 commits)
  refactor(memory-wiki): share freshness result construction (#146935)
  improve(gateway): use metadata projection for presence (#146817)
  test(agents): reuse complete Responses model fixtures (#147015)
  fix(sessions): align the reclamation-memory test with the archive session owner (#147028)
  refactor(terminal): simplify copy-sensitive token checks (#146934)
  refactor(media): remove duplicate spaced path fallback (#146933)
  refactor(cli): reuse command-group names (#146893)
  improve(plugins): reduce JavaScript generation capture work (#146993)
  test: align plugin fixtures with current runtime contracts (#147000)
  refactor(browser): separate session tab tracking from cleanup (#146973)
  fix(tests): make systemd clock fixtures private (#146990)
  fix(linux): retire sleep guards when logind disconnects (#146046)
  refactor(matrix): share draft fallback delivery (#144840)
  fix(sessions): preserve cross-agent replies after reload (#146799)
  test(models): cover quota recovery during catalog discovery (#146708)
  fix(macos): recover browser sign-in when no browser opens (#146787)
  fix(process): prevent one-shot agents exiting while polling (#144268)
  fix(status): label the session inventory as stored (#146979)
  fix: avoid repeated background reads while loading chat (#146953)
  refactor(ui): narrow Skill Workshop proposal context (#146977)
  ...
vincentkoc added a commit that referenced this pull request Sep 13, 2026
* commit '060e856e5f9df245d63c98990fcb47e18108c6b9': (97 commits)
  refactor(memory-wiki): share freshness result construction (#146935)
  improve(gateway): use metadata projection for presence (#146817)
  test(agents): reuse complete Responses model fixtures (#147015)
  fix(sessions): align the reclamation-memory test with the archive session owner (#147028)
  refactor(terminal): simplify copy-sensitive token checks (#146934)
  refactor(media): remove duplicate spaced path fallback (#146933)
  refactor(cli): reuse command-group names (#146893)
  improve(plugins): reduce JavaScript generation capture work (#146993)
  test: align plugin fixtures with current runtime contracts (#147000)
  refactor(browser): separate session tab tracking from cleanup (#146973)
  fix(tests): make systemd clock fixtures private (#146990)
  fix(linux): retire sleep guards when logind disconnects (#146046)
  refactor(matrix): share draft fallback delivery (#144840)
  fix(sessions): preserve cross-agent replies after reload (#146799)
  test(models): cover quota recovery during catalog discovery (#146708)
  fix(macos): recover browser sign-in when no browser opens (#146787)
  fix(process): prevent one-shot agents exiting while polling (#144268)
  fix(status): label the session inventory as stored (#146979)
  fix: avoid repeated background reads while loading chat (#146953)
  refactor(ui): narrow Skill Workshop proposal context (#146977)
  ...
vincentkoc added a commit that referenced this pull request Sep 13, 2026
* temp/pr-137049: (110 commits)
  improve: reduce GitHub OAuth maintenance work for large agent rosters (#147021)
  fix(test): avoid settings lock writer startup timeouts (#147029)
  fix(update): correct backup guidance and cover incident regressions (#147023)
  refactor(gateway): share connection lifecycle across transports (#145950)
  refactor(telegram): share HTML text escaping (#146936)
  perf(build): reduce disk use in UI performance checks (#146687)
  refactor(memory-wiki): share freshness result construction (#146935)
  improve(gateway): use metadata projection for presence (#146817)
  test(agents): reuse complete Responses model fixtures (#147015)
  fix(sessions): align the reclamation-memory test with the archive session owner (#147028)
  refactor(terminal): simplify copy-sensitive token checks (#146934)
  refactor(media): remove duplicate spaced path fallback (#146933)
  refactor(cli): reuse command-group names (#146893)
  improve(plugins): reduce JavaScript generation capture work (#146993)
  test: align plugin fixtures with current runtime contracts (#147000)
  refactor(browser): separate session tab tracking from cleanup (#146973)
  fix(tests): make systemd clock fixtures private (#146990)
  fix(linux): retire sleep guards when logind disconnects (#146046)
  refactor(matrix): share draft fallback delivery (#144840)
  fix(sessions): preserve cross-agent replies after reload (#146799)
  ...
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 13, 2026
* commit '0ac8a700e43efceef73d92fe8e50b185819e38ad': (27 commits)
  test(acpx): prove targeted turn cancellation (#137049)
  fix(ci): honor realtime meeting live-test opt-in (#147044)
  improve: reduce heartbeat enrollment work for large fleets (#147055)
  fix(gateway): install despite stale Linux session bus addresses (#146569)
  chore(i18n): refresh native locales (#147025)
  fix: avoid Gateway reinstalls when macOS service inspection is inconclusive (#146880)
  fix(pairing): QR setup rejects trusted-proxy gateways without a shared secret (#147036)
  fix(update): bound activation and accept slow Windows identity reads (#147019)
  perf(accounts): avoid materializing avatars for owner checks (#147032)
  improve(status): report external and ArrayBuffer memory (#141902)
  fix(update): preserve linked plugins during post-core sync (#147009)
  fix(channels): keep replies working after hot config reloads (#147001)
  refactor(gateway): defer worker transcript runtime loading (#143495)
  improve: reduce GitHub OAuth maintenance work for large agent rosters (#147021)
  fix(test): avoid settings lock writer startup timeouts (#147029)
  fix(update): correct backup guidance and cover incident regressions (#147023)
  refactor(gateway): share connection lifecycle across transports (#145950)
  refactor(telegram): share HTML text escaping (#146936)
  perf(build): reduce disk use in UI performance checks (#146687)
  refactor(memory-wiki): share freshness result construction (#146935)
  ...

# Conflicts:
#	src/config/sessions/session-accessor.sqlite-reclamation-memory.test.ts
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: memory-wiki maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant