feat(sync): one-way insert-only push to a foreign team board#274
Merged
Conversation
Add a `notion-taskboard` app: a one-way, insert-only push of a repo's board rows out to a team-OWNED Notion board (implements ops-toolkit ID-138, design locked 2026-06-16). The board is the source of truth; the sink is never read for merge and the board file is never written. Fields are set only on page-create, so a team member's later edits on the card are never overwritten. The local sync-state map is the identity index, a row is pushed exactly once. Status/Priority/Weight map to the team board's own option names via `.kit.toml [sync]` config, so the sink never mutates the team schema (it does one benign read to resolve the data source, never a PATCH). Dropped rows are skipped; a board state absent from the map uses status_default or fails closed with guidance rather than guessing a column. The two-way mesh and its four live adapters (Reminders/Notion/Hermes/ Multica) are untouched: create-only is a separate planner + apply path, dispatched on a source attribute. The engine's board parser is generalized from ID- to any [A-Z]+-\d+ prefix so it reads every adopted repo's board (e.g. dfoundation DF-NN). Fixtures only, no live team-board writes. 12 new cases incl. negative controls (dropped not pushed, already-pushed row frozen, unmapped status fails closed, skip-tag filter, missing config fails closed). See lib/sync/docs/specs/SPEC-003-oneway-create-push.md.
From kit:code-reviewer (architecture) + kit:advisor (critique): - No partial-batch duplicates: apply() checkpoints state after each create via an on_created callback, and a preflight validates the whole batch (maps resolve, options exist) before any POST. A mid-batch ntn failure never leaves a created page unrecorded, so the next run never re-pushes it. Preflight also runs before the dry-run return, so --dry-run surfaces config errors with zero writes. - Never auto-create a team option: preflight reads the board schema (never PATCHes it) and rejects any mapped option name not already on the board; select-type props no longer silently gain options on a typo. Prop types are auto-detected from the schema. - Two-way mesh stays ID-only: reverted TITLE_RE and gave parse_board a strict_id flag (default True). The one-way path reads with strict_id=False (any [A-Z]+-NNN) but never mints ids; warn_duplicate_ids takes the same flag so a DF- board still warns. - ensure_binding discards a cached binding for a different db_id (a repointed target never keeps pushing to the old board). - Dropped the unused skip_statuses param and the dead intake config key.
3 tasks
tieubao
added a commit
that referenced
this pull request
Jul 18, 2026
Reconciles the board against PRs #264-#277: strip-personal-paths, rustup-rustfmt, proof-ledger per-repo override scoping, learn-propose precision, five-legs rename, plain-words cheap cluster + glossary, behavioral-test tiering, sync cron + cockpit-mirror re-land, mega folder, and rung-4 redteam ledger. ID-020/ID-036 drop their stale 2026-06-27 open-status notes now that the absence-check and hook-fallback gaps they tracked are closed. New rows (ID-305..308) capture the deferred remainders: learn-propose precision follow-up, the redteam ledger row itself, the plain-words semantic-rename migration cluster, and the ADR-0034 orphan-folder question (HAN-GATED). ID-138 (notion-taskboard sync, PR #274) is an ops-toolkit board row; no matching row exists on this board, so it is left for the ops-toolkit board-scribe pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a
notion-taskboardapp to the board-sync engine (lib/sync): a one-way,insert-only push of a repo's
BACKLOG.mdrows out to a foreign, team-OWNEDNotion board. Implements ops-toolkit board row ID-138 (design locked
2026-06-16) as dwarves-kit SPEC-003.
Consumer wiring (dfoundation
DF-board -> the Dwarves Notion Task Board) is aseparate PR in
tieubao/dfoundation; tenant IDs (the Task Board UUID, Han'sNotion person id) live there, never in this repo.
Contract (why it is safe against a live team board)
and the board file is never written.
sync-state map is never re-pushed, so team edits are never overwritten.
OWN option names via config; preflight reads the schema (never PATCHes) and
rejects an unknown option instead of silently auto-creating a select option.
mid-batch
ntnerror never re-pushes a page next run.Isolation
The two-way mesh (Reminders/Notion/Hermes/Multica) is untouched: create-only is
a separate planner (
plan_create_only) + apply path, dispatched on a sourceattribute.
parse_boardstaysID--only for the two-way path (its id-mintingsiblings stay consistent); only the one-way READ view accepts any
[A-Z]+-NNNprefix, and it never mints or writes ids.
Notion access
Through the
ntnCLI (keychain auth), per Han's standing Notion rule. No rawAPI tokens; no live team-board writes in this PR.
Tests / proof
bash tests/test-sync.sh-> 89 passed (76 pre-change + 13 new; two-waysuites unchanged).
re-run (board byte-identical), partial-batch-failure-never-duplicates,
unknown-option-rejected, dry-run-validates, missing-config-fails-closed.
5/5 green.
step (dfoundation
.kit.toml+bin/board sync --dry-runthen real).6 confirmed findings applied (see the second commit).
Proof:
lib/sync/docs/proof-of-done.md; spec:lib/sync/docs/specs/SPEC-003-oneway-create-push.md.