Skip to content

fix(update): remove false dependency staleness - #124627

Merged
steipete merged 1 commit into
mainfrom
steipete/fix-dependency-freshness-status
Aug 16, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/fix-dependency-freshness-status

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where package installs with a valid lockfile and dependency marker could be reported as stale solely because their filesystem modification times differed.

Why This Change Was Made

The mtime of .modules.yaml or node_modules is not a reliable measure of install freshness. Missing lockfile and marker diagnostics remain intact; when both required artifacts exist, status now reports the dependencies as installed.

User Impact

openclaw status no longer reports false dependency staleness for valid installs, while genuinely missing dependency metadata is still surfaced.

Evidence

  • 53 focused tests passed.
  • Production LOC: +1/-32 (net -31); tests: +4/-15.
  • Format and diff checks are clean.
  • Fresh autoreview is clean with no accepted/actionable findings.

@clawsweeper

clawsweeper Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added the commands Command implementations label Aug 16, 2026
@steipete
steipete marked this pull request as ready for review August 16, 2026 14:09
@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Aug 16, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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 Aug 16, 2026
@clawsweeper

clawsweeper Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 16, 2026, 10:15 AM ET / 14:15 UTC.

ClawSweeper review

What this changes

This PR makes update status treat an existing lockfile and dependency marker as installed instead of declaring dependencies stale solely from their modification times.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

No correctness defect found: the PR removes a timestamp-only heuristic from the dependency-status owner while preserving concrete missing-marker diagnostics. Current main still has the heuristic, so the PR remains necessary; its maintainer label and member authorship route it through normal owner review rather than automated cleanup.

Priority: P2
Reviewed head: 876eca24b7e599241d0ca724769417f98ea92884

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A compact, owner-boundary bug fix with focused regression coverage and no identified correctness or security defect.
Proof confidence 🌊 off-meta tidepool Not applicable: This is a maintainer-authored PR, so the external-contributor real-behavior-proof gate does not apply; the supplied focused-test claim remains supplemental evidence.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This is a maintainer-authored PR, so the external-contributor real-behavior-proof gate does not apply; the supplied focused-test claim remains supplemental evidence.
Evidence reviewed 6 items Current-main behavior: Current main compares the lockfile and marker mtimes and returns stale when the lockfile is more than one second newer; the PR removes this timestamp-only branch.
Caller and output path: checkUpdateStatus owns the dependency result, and the status formatter currently renders its stale state as deps stale; the PR updates both ends of that one decision surface.
Focused regression boundary: Current coverage constructs a valid pnpm lockfile and marker with an older marker timestamp and expects stale; the PR changes that assertion to ok while retaining the missing-marker assertion.
Findings None None.
Security None None.

How this fits together

The update-status subsystem inspects an installation root and produces dependency, Git, and registry signals for openclaw status and openclaw update status. Those signals are condensed into operator-facing update output.

flowchart LR
  A[CLI status command] --> B[Update status check]
  C[Install root files] --> B
  B --> D[Dependency status decision]
  D --> E[Update summary]
  E --> F[Operator output]
Loading

Before merge

  • Complete next step (P2) - This maintainer-authored, protected-label PR needs normal owner review and exact-head CI rather than an automated repair lane.
Agent review details

Security

None.

PR surface

Source -31, Tests -11. Total -42 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 2 1 32 -31
Tests 1 4 15 -11
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 5 47 -42

Review metrics

Metric Value Why it matters
Production versus test LOC production +1/-32 (net -31); tests +4/-15 (net -11) The repair deletes the unreliable status mode and its formatter path rather than adding compatibility surface.

Technical review

Best possible solution:

Land the simplified presence-only diagnostic after normal maintainer review and exact-head CI, retaining the existing missing-lockfile and missing-marker signals.

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

Yes, source-reproducible: a present lockfile and marker whose marker mtime is over one second older deterministically produces stale on current main; this read-only review did not execute the fixture.

Is this the best way to solve the issue?

Yes. The current implementation has only timestamp ordering, not dependency-content equivalence, so removing that false-precision state while retaining missing-artifact diagnostics is the narrowest maintainable repair.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 3e2edc7f229e.

Labels

Label changes:

  • add P2: This corrects misleading update diagnostics with limited operator blast radius.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This is a maintainer-authored PR, so the external-contributor real-behavior-proof gate does not apply; the supplied focused-test claim remains supplemental evidence.

Label justifications:

  • P2: This corrects misleading update diagnostics with limited operator blast radius.
  • 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: This is a maintainer-authored PR, so the external-contributor real-behavior-proof gate does not apply; the supplied focused-test claim remains supplemental evidence.

Evidence

What I checked:

  • Current-main behavior: Current main compares the lockfile and marker mtimes and returns stale when the lockfile is more than one second newer; the PR removes this timestamp-only branch. (src/infra/update-check.ts:452, 3e2edc7f229e)
  • Caller and output path: checkUpdateStatus owns the dependency result, and the status formatter currently renders its stale state as deps stale; the PR updates both ends of that one decision surface. (src/commands/status.update.ts:187, 3e2edc7f229e)
  • Focused regression boundary: Current coverage constructs a valid pnpm lockfile and marker with an older marker timestamp and expects stale; the PR changes that assertion to ok while retaining the missing-marker assertion. (src/infra/update-check.test.ts:1004, 876eca24b7e5)
  • Source-update contract: The setup documentation directs source operators to run git pull followed by pnpm install; status therefore should not infer an installation mismatch from filesystem timestamps alone. Public docs: docs/start/setup.md. (docs/start/setup.md:163, 3e2edc7f229e)
  • History and ownership: The current dependency-status and formatter lines are attributed to Peter Steinberger in local blame; earlier update-path work also includes the detached-deployment update-status fix. (src/infra/update-check.ts:452, b07c6b2b8bec)
  • Not already on main: The proposed head is not contained in current main, and current-main source still exposes the timestamp-derived stale result. (src/infra/update-check.ts:462, 3e2edc7f229e)

Likely related people:

  • steipete: Current blame attributes the dependency-status and status-formatting path to this contributor, who also authored recent update-status history and this PR. (role: recent update-path contributor; confidence: high; commits: b07c6b2b8bec, fc45a0f1e682; files: src/infra/update-check.ts, src/commands/status.update.ts)

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.

@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready proof for #124627

Owner decision: land exact head 876eca24b7e599241d0ca724769417f98ea92884.

The root cause is the dependency-status owner treating lockfile/marker timestamp ordering as proof that an installation is stale. Filesystem mtimes do not establish dependency-content equivalence, so the canonical fix deletes that unsupported state at checkDepsStatus, preserves the concrete missing-lockfile and missing-marker diagnostics, and removes the dead deps stale formatter branch.

Proof:

  • 53 focused tests passed, including the older-valid-marker regression and retained missing-marker coverage.
  • Exact-head CI run 31951884293 is green with openclaw/ci-gate successful.
  • Fresh Codex-backed autoreview is clean with no accepted/actionable findings.
  • The completed exact-head ClawSweeper review found no findings and no rank-up code moves; its only remaining item was normal maintainer owner review and exact-head CI, now satisfied.
  • Production LOC is +1/-32 (net -31); tests are +4/-15 (net -11).
  • Missing lockfile and missing marker still produce visible missing outcomes; present artifacts now produce ok without a false timestamp inference. Silent-drop risk: none.

No rebase is needed solely because main moved. Proceeding through the repository-native /prepare-pr and merge gates; no release or deploy is in scope.

@steipete
steipete merged commit 8bf55bf into main Aug 16, 2026
307 checks passed
@steipete
steipete deleted the steipete/fix-dependency-freshness-status branch August 16, 2026 14:28
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. 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