Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ priority: P1
status: open
title: Dual-loop substrate attribution + reconciliation protocol — implementation work for BFT-many-masters at loop layer (Aaron 2026-05-02 + Otto independent extension)
created: 2026-05-02
last_updated: 2026-05-10
last_updated: 2026-05-31
depends_on:
- B-0160
children:
Expand Down Expand Up @@ -50,7 +50,7 @@ Aaron's morning reconciliation has to resolve these. The architecture's commitme

1. **Per-loop attribution channel.** ✅ SATISFIED BY EXISTING SUBSTRATE — Otto's tick-shards under `docs/hygiene-history/ticks/**` already include col2 model-identifier (e.g., `opus-4-7 / autonomous-loop session continuation`). Codex's loop should write to the same shard surface with its own model-identifier (e.g., `gpt-5.5 / codex-loop`). The col2 schema accommodates this; no schema change needed.

2. **Disagreement-preservation protocol for PR reviews.** ⏳ BLOCKEDrequires dual-loop running. When both loops review the same PR thread with different conclusions: each loop's review-comment is preserved with attribution; neither auto-resolves the other. The morning reconciliation reads both, decides, resolves accordingly. No silent overwrites.
2. **Disagreement-preservation protocol for PR reviews.** ⏳ PARTIALB-0164.1 has landed the pure detector/writer, divergence-shard builder, pending-shard reader, and reconcile CLI. Remaining work: wire a live PR-review workflow path so two loop observations on the same GitHub review thread actually invoke `fileReviewThreadDisagreement` when their conclusions differ.

3. **Branch-attribution for in-flight work.** ✅ SATISFIED BY EXISTING SUBSTRATE — When both loops produce concurrent commits to the same branch: each loop commits with its own author-identifier (already supported by `Co-Authored-By` trailer). Different loops working different threads don't conflict if file-isolation holds; if they touch the same file, the second loop's tick should detect the conflict and either rebase OR file a divergence-shard noting the conflict for morning reconciliation.

Expand Down Expand Up @@ -134,14 +134,14 @@ ACs #1, #3, #4 are closed. Remaining open work extracted as atomic child rows:

| Child | AC | Blocker | File |
|-------|----|---------|------|
| B-0164.1 | AC #2 — PR-review disagreement-preservation | B-0160 (dual-loop not running) | `B-0164.1-pr-review-disagreement-preservation-protocol.md` |
| B-0164.1 | AC #2 — PR-review disagreement-preservation | Live PR-review caller wiring | `B-0164.1-pr-review-disagreement-preservation-protocol.md` |
| B-0164.2 | AC #5 — Multi-loop tick-tooling attribution | B-0163 (tooling retirement) | `B-0164.2-multi-loop-tick-tooling-attribution.md` |
| B-0164.3 | AC #6 — Cron-tick coordination | B-0160 + B-0164.1 | `B-0164.3-cron-tick-coordination-dual-loop.md` |
| B-0164.3 | AC #6 — Cron-tick coordination | B-0164.1 live caller + topology observation | `B-0164.3-cron-tick-coordination-dual-loop.md` |

**Dependency order:**

```
B-0160 ──→ B-0164.1 ──→ B-0164.3
B-0160 (closed) ──→ B-0164.1 caller wiring ──→ B-0164.3
B-0163 ──→ B-0164.2 ──→ (B-0164.3 write-safety audit)
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ last_updated: 2026-05-31
depends_on:
- B-0160
parent: B-0164
classification: blocked
classification: buildable-now
decomposition: decomposed
owners: [architect]
type: friction-reducer
Expand Down Expand Up @@ -66,12 +66,18 @@ glue needed to detect that two loops have reviewed the same thread.
existing `gh pr review` / `gh pr comment` surface); changing the divergence
shard schema (already landed in B-0164 AC #4).

## Blocker
## Current blocker

Requires two loops actually running concurrently (B-0160 harness side).
Cannot test or verify the protocol without at least a simulated dual-loop
execution. Unblock path: land B-0160 → stand up Codex loop → run a
controlled dual-review experiment → validate this protocol against the outcome.
The original B-0160 harness-side dependency is now closed, and the repo-native
detector/reader/writer pieces have landed. The remaining work is the live
caller: a PR-review workflow path must capture two loop observations for the
same GitHub review thread and invoke `fileReviewThreadDisagreement` when their
machine-comparable conclusions differ.

Until that caller exists, AC #2 is not fully satisfied: a real dual-loop PR
review can still produce differing conclusions without automatically filing a
divergence shard. B-0164.3 remains separate; it decides tick cadence/topology
after this row has an operational caller.

## Composes with

Expand Down Expand Up @@ -160,3 +166,27 @@ controlled dual-review experiment → validate this protocol against the outcome
keeps list mode separate from the write-back path.
- Focused tests cover argv parsing, usage-error no-write behavior, and an
end-to-end CLI write-back against a writer-emitted divergence shard.

## Current implementation state (2026-05-31)

Implemented slices:

- `detectReviewThreadDisagreement` and `fileReviewThreadDisagreement` in
`tools/hygiene/divergence-shard.ts` compare two loop observations for the
same PR review thread, avoid GitHub auto-resolution, and file a divergence
shard when machine-comparable conclusions differ.
- `buildDivergenceShard` records the PR/thread topic, both attributed loop
perspectives, and a neutral disagreement summary, making the shard readable
without external context.
- `scanDivergenceDir` plus `tools/hygiene/divergence-reconcile.ts --list` /
`--reconcile` provide the morning read/action path for pending shards.

Remaining slice:

- Wire an existing PR-review workflow or loop observation path to call
`fileReviewThreadDisagreement` after two loops review the same GitHub review
thread. A repo-wide search currently finds the detector/writer only in the
hygiene module and tests, so no live path files the shard yet.

B-0164.3 remains open for the dual-loop cron-topology decision and observation
window after this caller exists.
12 changes: 6 additions & 6 deletions docs/backlog/P1/B-0164.3-cron-tick-coordination-dual-loop.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ status: open
title: "Cron-tick coordination for dual-loop operation (dual-loop AC #6)"
effort: S
created: 2026-05-10
last_updated: 2026-05-10
last_updated: 2026-05-31
depends_on:
- B-0160
- B-0164.1
parent: B-0164
classification: blocked
Expand Down Expand Up @@ -75,13 +74,14 @@ The trade-off maps to what failure mode is higher-priority:

## Blocker

Requires B-0160 (dual-loop harness side) and B-0164.1 (PR-review disagreement
protocol — coordination choice affects review ordering). Cannot implement
without at least two loops running experimentally.
B-0160 is closed, so the harness-side prerequisite is no longer the active
blocker. This row now waits on B-0164.1's live PR-review caller wiring: the
cron topology decision should observe a system where differing loop conclusions
on the same PR review thread can actually file a divergence shard.

## Composes with

- B-0160 (dual-loop harness integration — prerequisite)
- B-0160 (dual-loop harness integration — closed prerequisite)
- B-0164 (parent — divergence-shard schema)
- B-0164.1 (PR-review disagreement protocol — affected by topology choice)
- B-0164.2 (tick-tooling attribution — concurrent writes need write-safety audit)
Expand Down
Loading