Skip to content

feat(B-0164.1): add divergence reconcile JSON list output#6213

Merged
AceHack merged 4 commits into
mainfrom
claim/codex-loop-b0164-1-divergence-json-20260531
May 31, 2026
Merged

feat(B-0164.1): add divergence reconcile JSON list output#6213
AceHack merged 4 commits into
mainfrom
claim/codex-loop-b0164-1-divergence-json-20260531

Conversation

@AceHack
Copy link
Copy Markdown
Member

@AceHack AceHack commented May 31, 2026

Summary

  • add list-only --json output for tools/hygiene/divergence-reconcile.ts
  • expose deterministic schemaVersion: 1 pending-shard payloads for autonomous-loop consumers
  • reject --json with reconciliation write-back arguments before mutation
  • update B-0164.1 with the JSON list slice status

Checks

  • bun test tools/hygiene/divergence-reconcile.test.ts
  • git diff --check

Coordination

Lior and others added 3 commits May 31, 2026 09:48
…st slice

Why:
- The Codex backlog runner selected B-0164.1 as the next ready item.
- A machine-readable pending-divergence readout is a small unblocked tooling slice below the blocked live dual-loop experiment.

Scope:
- Claim the divergence reconcile JSON list-output slice before implementation edits.

Agency-Signature-Version: 1
Agent: Vera
Agent-Runtime: OpenAI Codex background service
Agent-Model: GPT-5
Credential-Identity: aaron-codex-launchd-loop
Credential-Mode: shared
Human-Review: none
Human-Review-Evidence: none
Action-Mode: autonomous-fail-open
Task: B-0164.1
Co-Authored-By: Codex <noreply@openai.com>
Codex-Origin: codex-launchd-loop
Codex-Surface: codex-background-service
Codex-Loop-Run-Id: 20260531T134516Z
Why:
- Bring the active Codex B-0164.1 claim branch onto current origin/main after #6212 merged.
- Keep the later JSON-output implementation PR diff scoped to this claim instead of replaying already-merged docs edits.

Scope:
- Merge origin/main into the claim branch with no conflict resolution needed.

Agency-Signature-Version: 1
Agent: Vera
Agent-Runtime: OpenAI Codex background service
Agent-Model: GPT-5
Credential-Identity: aaron-codex-launchd-loop
Credential-Mode: shared
Human-Review: none
Human-Review-Evidence: none
Action-Mode: autonomous-fail-open
Task: B-0164.1
Co-Authored-By: Codex <noreply@openai.com>
Codex-Origin: codex-launchd-loop
Codex-Surface: codex-background-service
Codex-Loop-Run-Id: 20260531T134516Z
Why:
- Autonomous loops need a machine-readable pending-divergence readout instead of parsing the human reconciliation report.
- Keep the structured output below the blocked live dual-loop boundary by limiting it to side-effect-free list mode.

Scope:
- Add list-only --json output with schemaVersion 1 and pending shard entries.
- Reject --json with write-back reconciliation arguments before any mutation.
- Cover parseArgs and CLI JSON payload behavior with focused Bun tests.

Checks:
- bun test tools/hygiene/divergence-reconcile.test.ts
- git diff --check

Agency-Signature-Version: 1
Agent: Vera
Agent-Runtime: OpenAI Codex background service
Agent-Model: GPT-5
Credential-Identity: aaron-codex-launchd-loop
Credential-Mode: shared
Human-Review: none
Human-Review-Evidence: none
Action-Mode: autonomous-fail-open
Task: B-0164.1
Co-Authored-By: Codex <noreply@openai.com>
Codex-Origin: codex-launchd-loop
Codex-Surface: codex-background-service
Codex-Loop-Run-Id: 20260531T134516Z
Copilot AI review requested due to automatic review settings May 31, 2026 14:12
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a list-only --json output mode to tools/hygiene/divergence-reconcile.ts, producing a deterministic { schemaVersion: 1, pending: [...] } payload for autonomous-loop consumers. --json combined with reconciliation write-back arguments is rejected before any mutation. The B-0164.1 backlog row is updated to record the slice, and a Codex claim file is added.

Changes:

  • New --json flag with ListOutputFormat, PendingShardListJson, pendingShardListJson, and renderPendingJsonReport helpers; usage and parseArgs updated; --json + reconcile args rejected.
  • Tests cover argv parsing for --json/--list --json, the rejection path, and end-to-end JSON output via the CLI main entrypoint.
  • Backlog row B-0164.1 updated with the JSON list slice; new claim file under docs/claims/.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
tools/hygiene/divergence-reconcile.ts Adds --json list mode, schema-versioned payload type/helpers, and argv guards.
tools/hygiene/divergence-reconcile.test.ts Covers --json parsing, rejection alongside --reconcile, and CLI JSON output shape.
docs/backlog/P1/B-0164.1-pr-review-disagreement-preservation-protocol.md Documents the JSON list slice and updates the morning read/action path.
docs/claims/codex-loop-b0164-1-divergence-json-20260531.md New Codex claim file for this slice (should be released in this PR).

Comment thread docs/claims/codex-loop-b0164-1-divergence-json-20260531.md Outdated
Why:
- Copilot review correctly noted completed claim files must be released in the same PR that lands the work.
- Keep docs/claims from accumulating landed claim records on main.

Scope:
- Remove the B-0164.1 JSON readout claim file from the PR branch.

Checks:
- git diff --check

Agency-Signature-Version: 1
Agent: Vera
Agent-Runtime: OpenAI Codex background service
Agent-Model: GPT-5
Credential-Identity: aaron-codex-launchd-loop
Credential-Mode: shared
Human-Review: Copilot PR review
Human-Review-Evidence: PR #6213 thread PRRT_kwDOSF9kNM6F8eBL
Action-Mode: autonomous-fail-open
Task: B-0164.1
Co-Authored-By: Codex <noreply@openai.com>
Codex-Origin: codex-launchd-loop
Codex-Surface: codex-background-service
Codex-Loop-Run-Id: 20260531T134516Z
@AceHack AceHack merged commit f89cb12 into main May 31, 2026
33 checks passed
@AceHack AceHack deleted the claim/codex-loop-b0164-1-divergence-json-20260531 branch May 31, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants