Skip to content

fix(cli): retire pending rows a merge outdates; point identity rows at adjudicate - #1280

Merged
jasonssdev merged 2 commits into
mainfrom
fix/1266-pending-rows
Oct 2, 2026
Merged

jasonssdev merged 2 commits into
mainfrom
fix/1266-pending-rows

Conversation

@jasonssdev

Copy link
Copy Markdown
Owner

Summary

Two commits.

#1266 — pending rows outlive merged concepts; purge drops the queue silently

  • merge now retires as stale every open pending row that names the absorbed concept, including an identity row over a larger group and relation_type rows (new pq.retire_open_naming, called from queue_resolution.resolve_merged). Open rows that do not name the absorbed id are untouched; rows already applied, declined or stale keep their state. test_merge_leaves_an_identity_row_over_a_different_member_set_open asserted the old behavior and now asserts the row goes stale.
  • purge's notice now says the findings.db drop also loses the whole pending-work queue and that openkos daemon --once rebuilds it; the jobs.db line now mentions the inbox watch history and that the next pass re-checks every inbox file. Purge stays warn-only.
  • forget already swept the queue; unmerge is unchanged (the concept returns and the next pass recomputes its rows).

#1265 (pending side)

  • Identity rows in pending now hint resolve: openkos adjudicate --apply (y merges, s skips, d records keep-distinct), with the keep-distinct command on an or: line; a group of more than two members is told that adjudicate --apply prints the pairwise merge commands. Rows already judged "same" keep their hint.
  • A kind with 50 or more open rows gets note: 50 is the per-run candidate cap, so more may exist; ..., naming duplicates for identity and suggest-relations for relation_type. The queue records no truncation, so this is inferred from the row count: exactly 50 rows shows the note even when nothing was cut.

Specs: pending-work (merge-retire scenario, hint wording, cap-note requirement) and privacy-purge (the two notice lines); docs/cli.md pending and purge sections.

Related issue

Closes #1266
Refs #1265

Type of change

  • feat — new feature
  • fix — bug fix
  • docs — documentation only
  • refactor — no behavior change
  • test — tests only
  • chore / ci — tooling, build, or CI
  • Breaking change

How was this tested?

  • Observed RED before each fix: merge retire (('pending', None) == ('stale', 'stale')), the purge notice, 4 hint failures in test_pending.py, and the cap note.
  • Mutation: dropping the open-status filter in the retire fails 3 tests (including one that keeps a declined row); >= → > in the cap check fails both cap tests.
  • ruff check, ruff format --check, mypy ., pytest --cov (96.45%), evals/run_self_tests.py (46/46) pass locally.

Checklist

  • My commits follow Conventional Commits.
  • I added or updated tests for the change.
  • I updated docs where behavior, interfaces, or the knowledge model changed.
  • Lint, format, type check, and tests pass locally (ruff, mypy, pytest).
  • Output remains OKF-conformant and derived stores stay reconstructible from the bundle + sources.
  • The change is consistent with the project's guiding principles (local-first, provenance, freshness, human-in-the-loop).

@jasonssdev
jasonssdev force-pushed the fix/1266-pending-rows branch from e4cec75 to 63e1cb1 Compare October 2, 2026 22:42
@jasonssdev
jasonssdev merged commit 94f0149 into main Oct 2, 2026
9 checks passed
@jasonssdev
jasonssdev deleted the fix/1266-pending-rows branch October 2, 2026 22:59
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.

bug: pending rows outlive the concepts a merge removed, and purge drops the whole queue without saying so

1 participant