Skip to content

feat: reconcile running development loops#98

Merged
ncolesummers merged 5 commits into
mainfrom
95/run-reconciliation
Jul 23, 2026
Merged

feat: reconcile running development loops#98
ncolesummers merged 5 commits into
mainfrom
95/run-reconciliation

Conversation

@ncolesummers

Copy link
Copy Markdown
Owner

Summary

  • add a required manifest-defined reconciliation silence threshold
  • persist typed terminal reasons and finalize runs with compare-and-set semantics
  • reconcile running development-loop runs against execution liveness and read-only GitHub issue state
  • centralize reconciliation tracing, structured logs, completion events, and metrics
  • document the liveness boundary, precedence rules, idempotency, and issue Enforce manifest concurrency, dispatch leases, and retry backoff #96 handoff in Proposed ADR 0016

Why

Running development-loop records could remain active indefinitely after their durable execution disappeared, stopped making progress, or became superseded by tracker state. The existing run status also could not distinguish timeout, stall, or reconciliation cancellation.

This change adds a deterministic, read-only reconciliation entry point backed by Postgres state. It deliberately injects execution liveness rather than inferring it from step rows, preserving dispatch leases and scheduling for #96.

Behavior

  • inactive execution becomes failed/timed_out
  • positively active but silent execution becomes failed/stalled
  • closed or relabeled issues honor the manifest cancellation policy
  • unknown liveness and GitHub read failures fail open
  • cancellation wins over timeout, then stall
  • concurrent or repeated finalization emits one transition, durable event, completion metric, and duration metric
  • step rows remain unchanged as forensic evidence

Review notes

Two fresh adversarial reviews were run after the first green implementation. Regressions were added for stale health snapshots, future queued-step activity, liveness-provider exceptions, cross-loop selection, cancellation-policy propagation, and compatibility-wrapper reason handling.

Automatic scheduling/calling of reconciliation remains scoped to #96.

Validation

  • bun run build
  • bun run validate
    • 73 Vitest files, 444 tests passed
    • Storybook production build passed
    • 27 Playwright tests passed
  • focused issue suite: 7 files, 64 tests passed
  • git diff --check main..HEAD

Closes #95

Prepared with Codex (GPT-5).

uidaho-nsummers and others added 5 commits July 22, 2026 21:52
Co-authored-by: Codex (GPT-5) <codex@openai.com>
Co-authored-by: Codex (GPT-5) <codex@openai.com>
Co-authored-by: Codex (GPT-5) <codex@openai.com>
Co-authored-by: Codex (GPT-5) <codex@openai.com>
Co-authored-by: Codex (GPT-5) <codex@openai.com>
@vercel

vercel Bot commented Jul 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
loopworks Ready Ready Preview, Comment Jul 23, 2026 4:59am

Request Review

@ncolesummers
ncolesummers marked this pull request as ready for review July 23, 2026 05:14
Copilot AI review requested due to automatic review settings July 23, 2026 05:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@ncolesummers
ncolesummers merged commit 6cefc35 into main Jul 23, 2026
4 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Loopworks Backlog Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Run reconciliation: stall detection, orphan recovery, and cancellation

3 participants