Skip to content

Honor tracker conflict tiebreak in deterministic status policy - #270

Merged
gmickel merged 5 commits into
mainfrom
fn-146-honor-tracker-conflict-tiebreak-in
Jul 29, 2026
Merged

Honor tracker conflict tiebreak in deterministic status policy#270
gmickel merged 5 commits into
mainfrom
fn-146-honor-tracker-conflict-tiebreak-in

Conversation

@gmickel

@gmickel gmickel commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Honor tracker conflict tiebreak in deterministic status policy

GitHub #268 exposed a contract gap: tracker.conflictTiebreak was configured and documented, but the deterministic status policy always returned status-deadlock. This change wires the existing setting into the shared provider-neutral decision path.

Spec: fn-146-honor-tracker-conflict-tiebreak-in
Branch: fn-146-honor-tracker-conflict-tiebreak-inorigin/main
Tasks: 1 completed
R-ID coverage: 7/7 satisfied

TL;DR

  • Honors always-ask, flow-wins, and tracker-wins in the shared deterministic status policy.
  • Rejects malformed persisted values before claims or sequence work, with zero side effects.
  • Preserves merge-evidence gating, provider-neutral writes, local terminal folds, and candidate-bearing conflicts.
  • Adds direct-status, facade, receipt, provider-parity, and distribution regression coverage.
  • Updates canonical, Codex-mirror, bundled, and public documentation surfaces.

R-ID coverage

R-ID Acceptance criterion Task Evidence
R1 always-ask preserves candidate-bearing conflicts for both terminal×active orientations with no mutation. fn-146-honor-tracker-conflict-tiebreak-in.1 30341e0, c6db2eb
R2 flow-wins applies Flow state through the provider-neutral write path with merge-evidence gating. fn-146-honor-tracker-conflict-tiebreak-in.1 30341e0, c6db2eb
R3 A terminal tracker uses the existing local fold and pulled/aggregate receipt path. fn-146-honor-tracker-conflict-tiebreak-in.1 30341e0, c6db2eb
R4 An active tracker against terminal Flow returns a typed, candidate-bearing unrepresentable conflict. fn-146-honor-tracker-conflict-tiebreak-in.1 30341e0, c6db2eb
R5 Missing config defaults safely; malformed runtime and CLI values fail with strict validation before mutation. fn-146-honor-tracker-conflict-tiebreak-in.1 30341e0, c6db2eb
R6 Regression coverage spans both orientations, all policies, direct/facade paths, side effects, receipts, and providers. fn-146-honor-tracker-conflict-tiebreak-in.1 30341e0, c6db2eb
R7 Runtime copies, manifests, mirrors, docs, changelog, focused/full tests, and Ruff remain aligned. fn-146-honor-tracker-conflict-tiebreak-in.1 30341e0, c6db2eb

Verification

fn-146-honor-tracker-conflict-tiebreak-in.1cd plugins/flow-next/tests && python3 -m unittest test_tracker_status test_tracker_facade test_tracker_config -q · cd plugins/flow-next/tests && python3 -m unittest test_tracker_status test_tracker_facade test_tracker_config test_tracker_distribution -q · python3 scripts/run_tests_parallel.py · uvx ruff@0.16.0 check plugins/flow-next/scripts/flowctl.py plugins/flow-next/scripts/flowctl_tracker/status/policy.py plugins/flow-next/scripts/flowctl_tracker/status/verb.py plugins/flow-next/scripts/flowctl_tracker/facade/ops.py plugins/flow-next/tests/test_tracker_status.py plugins/flow-next/tests/test_tracker_facade.py plugins/flow-next/tests/test_tracker_config.py · uvx ruff@0.16.0 check . · ./scripts/sync-codex.sh (twice; idempotent and validation guards green) · cd /Users/gordon/work/flow-next.dev && pnpm build

Critical changes

  • High-churn: plugins/flow-next/tests/test_tracker_status.py (+205/-1 lines)
  • High-churn: plugins/flow-next/tests/test_tracker_facade.py (+88/-0 lines)
  • High-churn: plugins/flow-next/scripts/flowctl_tracker/status/policy.py (+67/-1 lines)
  • High-churn: .flow/specs/fn-146-honor-tracker-conflict-tiebreak-in.json (+120/-0 lines)
  • High-churn: .flow/specs/fn-146-honor-tracker-conflict-tiebreak-in.md (+91/-0 lines)

How to review this PR

The pipeline verified all 7 R-IDs, 194 focused tests, the 3,286-test full suite, pinned Ruff, distribution parity, two idempotent Codex sync passes, and the public-doc build. Cross-model implementation and spec-completion reviews both returned SHIP. Human judgment should focus on authority selection at the deadlock boundary, fail-fast placement, and whether the unrepresentable mirror remains safely non-mutating.

Review plan

Must review (~13%)

  • plugins/flow-next/scripts/flowctl_tracker/status/policy.py — high-churn authority-selection logic. Do all three policies preserve deadlock-first ordering and the unrepresentable conflict boundary in decide()?
  • plugins/flow-next/scripts/flowctl_tracker/status/verb.py — runtime status path. Does status() validate before its claim and preserve existing apply/apply-local persistence semantics?
  • plugins/flow-next/scripts/flowctl_tracker/facade/ops.py — lifecycle entry paths. Do op_push(), op_pull(), and op_reconcile() reject malformed config before sequence work?
  • plugins/flow-next/scripts/flowctl.py — CLI validation. Does cmd_config_set() retain the strict enum error contract?

Spot-check

  • plugins/flow-next/tests/test_tracker_status.py — both collision orientations, all policies, provider parity, receipts, and no-mutation assertions.
  • plugins/flow-next/tests/test_tracker_facade.py — facade consumption and fail-fast side-effect matrix.
  • plugins/flow-next/tests/test_tracker_config.py — strict CLI enum cases.
  • plugins/flow-next/docs/flowctl.md, plugins/flow-next/docs/tracker-sync.md, plugins/flow-next/skills/flow-next-tracker-sync/references/status-sync.md, and CHANGELOG.md — runtime/documentation agreement.
  • plugins/flow-next/scripts/flowctl_tracker/MANIFEST.json — distribution hashes.

Safe to skim

  • .flow/bin/flowctl.py, .flow/bin/flowctl_tracker/facade/ops.py, .flow/bin/flowctl_tracker/status/policy.py, and .flow/bin/flowctl_tracker/status/verb.py — propagated runtime copies, parity-tested.
  • .flow/bin/flowctl_tracker/MANIFEST.json — generated distribution state.
  • plugins/flow-next/codex/skills/flow-next-tracker-sync/references/status-sync.md — regenerated by sync-codex.sh, guard-verified.
  • .flow/specs/fn-146-honor-tracker-conflict-tiebreak-in.json, .flow/specs/fn-146-honor-tracker-conflict-tiebreak-in.md, .flow/tasks/fn-146-honor-tracker-conflict-tiebreak-in.1.json, and .flow/tasks/fn-146-honor-tracker-conflict-tiebreak-in.1.md — Flow task/spec state.

Memory left behind

Bugs captured during this spec:

  • bug/integration/caller-facade-guards-must-cover-retro-2026-07-29 — The primary Capture lifecycle touchpoint used the fn-140 facade, but its bounded MISSING-receipt retro-fire still instructed the removed skill-dispatch grammar.
  • bug/integration/caller-fakes-must-enforce-lifecycle-2026-07-29 — The tracker caller execution harness accepted incomplete lifecycle facade calls and returned no output, so active-path tests could pass while omitting required operation inputs or ignoring a JSON stream leak.
  • bug/integration/caller-oracle-must-preserve-historical-2026-07-29 — The first caller oracle normalized desired future event tags into the historical baseline and stored active observations as prose.
  • bug/integration/tracker-ownership-rewrites-require-2026-07-29 — The deterministic tracker ownership rewrite passed focused tests but review found stale adjacent contracts.

Glossary / strategy notes

  • Spec-driven team patterns** — makes the documented tracker projection contract executable and auditable.
  • Ralph autonomous mode** — preserves always-ask defer semantics while allowing explicitly configured deterministic recovery.
  • Cross-platform parity** — fixes the shared provider-neutral path and propagates every bundled copy.
  • Self-improving through normal work** — converts a live release-recovery finding into a regression-backed deterministic contract.

Closes #268

Generated by /flow-next:make-pr from fn-146-honor-tracker-conflict-tiebreak-in against origin/main on 2026-07-29.

gmickel added 5 commits July 29, 2026 19:37
- route deadlocks through validated flow-wins and tracker-wins policy
- preserve no-mutation conflicts for unrepresentable tracker-active mirrors
- cover direct, facade, config, provider, docs, and bundled parity

Task: fn-146-honor-tracker-conflict-tiebreak-in.1
- record Codex SHIP verdict for the implementation
- preserve task-scoped review history

Task: fn-146-honor-tracker-conflict-tiebreak-in.1
- record completion summary and verification evidence
- mark fn-146 task done

Task: fn-146-honor-tracker-conflict-tiebreak-in.1
@gmickel

gmickel commented Jul 29, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 86d5c4a33c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@gmickel
gmickel merged commit 336c17d into main Jul 29, 2026
9 checks passed
@gmickel
gmickel deleted the fn-146-honor-tracker-conflict-tiebreak-in branch July 29, 2026 19:43
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.

Honor tracker.conflictTiebreak when resolving status deadlocks

1 participant