Skip to content

test(infra): exercise live owner expiry policy - #207672

Merged
vincentkoc merged 2 commits into
mainfrom
test-stale-lock-expiry-oracle-20261129
Nov 29, 2026
Merged

vincentkoc merged 2 commits into
mainfrom
test-stale-lock-expiry-oracle-20261129

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 28, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

The live-owner expiry case calls an identity helper that never examines timestamp age, leaving its named expiry behavior untested.

User Impact

Protect the existing default expiry policy against evicting a live owner. No product behavior or case count changes.

Why This Change Was Made

Call the real age-aware policy with a fixed expired timestamp while retaining the existing false assertion.

Evidence

  • Removing the policy's live-owner guard leaves all eight original cases passing; the repaired expiry case fails.
  • The repaired stale-owner cases and file-lock consumer cases pass with production restored.
  • Targeted formatting, lint, infrastructure test types and diff checks pass.
  • Local ClawSweeper reviewed the complete committed range 501ee91..e5f9d87 with no findings.
  • Exact-head native suite and review-artifact validation pass.

@vincentkoc vincentkoc self-assigned this Nov 28, 2026
@clawsweeper

clawsweeper Bot commented Nov 28, 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.

View the workflow run.

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. clawsweeper:intake:bug Preliminary submission classification; full source review pending. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Nov 28, 2026
@clawsweeper

clawsweeper Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: passed.

What this changes

This PR changes the live-owner expiry test to call the age-aware lock-reclamation policy with fixed timestamps.

Example: A lock records PID 123 and is 11 seconds old, with a 10 ms expiry threshold and no definite evidence that its owner died.

  • Before: The test checks only owner identity, so removing the expiry policy's live-owner guard would go undetected.
  • After: The test calls the expiry policy and verifies that it retains the lock.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused test repair is correct by inspection; execution confidence rests on the author's focused-check report because hosted test lanes were skipped.
Proof confidence 🦐 gold shrimp (3/6) No user-visible behavior changes; source inspection supports the reported mutation result, and shipped-entry-point proof is unnecessary for this test repair.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: An accidental change allowing expiry to evict a live lock owner could escape the test intended to protect against it.
Reason: The repair closes a concrete coverage gap using the existing case and production policy, with no new runtime machinery.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it makes an existing test exercise the correct expiry policy with a minimal, focused change; no actionable defects were found, and it remains a draft.

Reviewed head: e5f9d87ba275fb0e4065e7f9961e3868d9cf0578

Before merge

None.

Findings

None.

Agent review details

How this fits together

The shared lock policy receives sidecar ownership and age information and returns whether the file-lock adapter may reclaim the lock.

flowchart TD
  A[File lock adapter] --> B[Expiry and owner policy]
  T[Fixed expiry test] --> B
  B --> C[Process identity inspection]
  C --> D[Retain live owner lock]
Loading

Technical review

Best possible solution:

Retain this focused repair to the existing test without changing production lock policy.

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

Source inspection confirms that the original case bypasses expiry handling and would miss removal of its live-owner guard; the reported mutation run was not independently executed during this read-only review.

Is this the best way to solve the issue?

Calling the existing production policy with a fixed clock is the smallest complete repair and preserves the identity-helper coverage supplied by neighboring cases.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 9a279493175f.

Provenance checked

  • Live-owner expiry test keeps the original intent (9b1c36d: The historical repair distinguished definite owner retirement from generic pidless expiry recovery while preserving live owners.)

Testing

Proof path: unit tests only.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit b9c6e9c adds src/infra/stale-lock-file.test.ts:14 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: b9c6e9c0163f; files: src/infra/stale-lock-file.test.ts)
  • Alix-007: Raw commit daa7b1d adds src/infra/stale-lock-file.test.ts:5 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: daa7b1d06ba0; files: src/infra/stale-lock-file.test.ts)

PR surface

Tests +2. Total +2 across 1 file. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 3 1 +2
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 3 1 +2

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

No label changes.

Label justifications:

  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 28, 2026, 2:01 PM ET / 19:01 UTC.

@vincentkoc
vincentkoc marked this pull request as ready for review November 29, 2026 00:06
@vincentkoc
vincentkoc merged commit 176d483 into main Nov 29, 2026
97 checks passed
@vincentkoc
vincentkoc deleted the test-stale-lock-expiry-oracle-20261129 branch November 29, 2026 01:50
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Nov 29, 2026
…line

* commit '652611b9d924c754ac7a18d0081cce6e1ec765df': (527 commits)
  refactor(infra): simplify audit recovery write progress (#157141)
  fix: show restart blockers in service logs (#207879)
  test(infra): exercise group identity in session roundtrip (#207671)
  test(infra): exercise live owner expiry policy (#207672)
  feat: let Knowledge learn from your Gmail through Composio (#207266)
  test: stop the history-worker overload test from failing CI on slow runners (#207862)
  test(auth): assert SecretRef plaintext is absent from storage (#207698)
  chore(doctor): hold expired doctor migrations as removal-pending (#207865)
  fix: show ended one-time automations in History (#201280)
  chore(release): update appcast for 2026.11.11 (#207504)
  fix: let updates back up deeply nested databases (#207756)
  fix(telegram): stop resending earlier messages to the model on every turn in DM topics (#207684)
  feat(workboard): choose which sessions appear on a board (#207781)
  fix: acknowledge updates when the Gateway first becomes ready (#207819)
  chore: stop the cron recovery test from failing CI on slow runners (#207837)
  fix: queue follow-ups when session creation reuses an active chat (#207800)
  feat(clawrouter): consume qualified native memory embeddings (#191874)
  fix: save the account for main-session prompts and converted reminders (#207776)
  test(infra): measure worker Buffer storage directly (#207663)
  feat(workboard): hide sessions and filter subagents per board (#207744)
  ...
vincentkoc added a commit that referenced this pull request Nov 29, 2026
…line

* commit 'c876514dc21154a07f3755320495d2a93584b46b': (538 commits)
  perf(agents): reuse prepared tool catalog executors (#207900)
  fix: show the Gateway command default beside host rules in Devices (#207887)
  fix: verify chat Stop recovery after dashboard pairing (#207888)
  test(activity): check midnight refresh against the elapsed window (#207859)
  test(ui): use one persisted message ID in queued-image handoff (#207861)
  test(agents): release configured MCP fixture resources (#207716)
  fix(workboard): clear CI failures in the session filter editor (#207858)
  perf(ai): reduce allocation in OpenAI Responses streams (#207889)
  chore: stop the Workboard resident-owner CLI test from failing on main (#207898)
  test(agents): isolate endpoint-based overflow classification (#207688)
  chore(doctor): record why the root defaultModel migration stays (#207890)
  refactor(infra): simplify audit recovery write progress (#157141)
  fix: show restart blockers in service logs (#207879)
  test(infra): exercise group identity in session roundtrip (#207671)
  test(infra): exercise live owner expiry policy (#207672)
  feat: let Knowledge learn from your Gmail through Composio (#207266)
  test: stop the history-worker overload test from failing CI on slow runners (#207862)
  test(auth): assert SecretRef plaintext is absent from storage (#207698)
  chore(doctor): hold expired doctor migrations as removal-pending (#207865)
  fix: show ended one-time automations in History (#201280)
  ...
vincentkoc added a commit that referenced this pull request Nov 29, 2026
* commit '2194d14488091e2047d2f87ebbb093212f30840e': (540 commits)
  fix: stop reporting a child worker as finished when the Gateway loses contact (#207713)
  fix: keep the Activity visibility test stable at midnight (#207847)
  perf(agents): reuse prepared tool catalog executors (#207900)
  fix: show the Gateway command default beside host rules in Devices (#207887)
  fix: verify chat Stop recovery after dashboard pairing (#207888)
  test(activity): check midnight refresh against the elapsed window (#207859)
  test(ui): use one persisted message ID in queued-image handoff (#207861)
  test(agents): release configured MCP fixture resources (#207716)
  fix(workboard): clear CI failures in the session filter editor (#207858)
  perf(ai): reduce allocation in OpenAI Responses streams (#207889)
  chore: stop the Workboard resident-owner CLI test from failing on main (#207898)
  test(agents): isolate endpoint-based overflow classification (#207688)
  chore(doctor): record why the root defaultModel migration stays (#207890)
  refactor(infra): simplify audit recovery write progress (#157141)
  fix: show restart blockers in service logs (#207879)
  test(infra): exercise group identity in session roundtrip (#207671)
  test(infra): exercise live owner expiry policy (#207672)
  feat: let Knowledge learn from your Gmail through Composio (#207266)
  test: stop the history-worker overload test from failing CI on slow runners (#207862)
  test(auth): assert SecretRef plaintext is absent from storage (#207698)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS 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