Skip to content

Add process and SQLite lock diagnostics #102

Description

@joshka

Parent: #100

Related Gitcrawl context: openclaw/gitcrawl#81

Observed Workflow

After long-running archive work, I needed to confirm that Discrawl had actually stopped before doing final checks.

discrawl status --json was useful for archive state, but it did not answer whether anything was still actively writing.

Current Workaround

The manual check involved:

  • looking for active discrawl, wiretap, and sqlite3 processes
  • avoiding shell self-matches in process greps
  • handling stale pgrep hits
  • opening the Discrawl DB read-only
  • running pragma quick_check
  • checking discrawl status --json separately

Request

Add process, lock, and integrity diagnostics.

Example shape:

discrawl doctor --locks
discrawl status --processes --integrity --json

Useful Output

  • active database path
  • WAL state and size
  • sync lock path and owner metadata, when present
  • likely active Discrawl writer processes, when detectable
  • likely active wiretap processes, when detectable
  • read-only integrity check result
  • whether the database appears safe for read-only inspection
  • clear distinction between archive freshness and active writer state

Why This Matters

For Codex-assisted maintainer workflows, it is useful to ask: "is the archive still being updated, or can I safely inspect/report coverage now?" Today that answer requires shell-specific process checks and one-off SQLite commands.

Acceptance Criteria

  • Has JSON output.
  • Reports DB path and WAL state.
  • Reports read-only DB health.
  • Best-effort detects active Discrawl writer processes.
  • Best-effort detects active wiretap import processes.
  • Clearly distinguishes archive health from active-process state.

Prepared with Codex, confirmed as accurate by human.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions