docs(policy): enforce package-origin-only contract [t_3d75d441] #3

Open
hermes wants to merge 1 commit from kanban/t_3d75d441-package-origin-policy into main
Owner

Kanban-Board: multi-alt
Kanban-Task: t_3d75d441

Goal and scope
Make package-origin-only an immutable multi-alt contract and provide an idempotent canonical-manifest/live-board migration guard. No live DB was modified; the coordinator runs the explicit board target only after merge.

Changed files

  • README.md, .hermes.md
  • docs/MVP.md, docs/ARCHITECTURE.md, docs/DECISIONS.md
  • kanban/mvp-tasks.json
  • kanban/migrate_package_origin.py
  • kanban/tests/test_package_origin_policy.py
  • kanban/tests/test_worktree_pr_workflow.py

Tests

  • python3 -m unittest discover -s kanban/tests -v: 7/7 passed
  • python3 tests/verify-doc-links.py: 24 files passed
  • python3 kanban/migrate_package_origin.py --manifest kanban/mvp-tasks.json --check: zero violations
  • Python py_compile: passed
  • Zig 0.16.0 fmt --check: passed
  • Zig Debug tests: 59/59 passed
  • Zig ReleaseSafe tests: 59/59 passed
  • Zig ReleaseSafe build: 19/19 steps passed
  • git diff --check: passed

Compatibility and provenance
Repository metadata and individually selected RPM acquisition remain allowed. OCI/LXC/ISO remain output emitters only. No RPM/APT behavior, artifact bytes, registry state, stable namespace, secrets, runners, disks, or live Kanban DB were changed. Base is origin/main 0ef62010c5; head is 1110a98d96.

Residual risks and rollback

  • The live-board migration is intentionally deferred until this PR is merged and must be run by the coordinator with an explicit --board-db path.
  • Card classification treats assigned unfinished cards as coding cards and preserves unassigned manual gates byte-for-byte.
  • Rollback is a revert of this single commit; no external artifact or DB rollback is required.
Kanban-Board: multi-alt Kanban-Task: t_3d75d441 Goal and scope Make package-origin-only an immutable multi-alt contract and provide an idempotent canonical-manifest/live-board migration guard. No live DB was modified; the coordinator runs the explicit board target only after merge. Changed files - README.md, .hermes.md - docs/MVP.md, docs/ARCHITECTURE.md, docs/DECISIONS.md - kanban/mvp-tasks.json - kanban/migrate_package_origin.py - kanban/tests/test_package_origin_policy.py - kanban/tests/test_worktree_pr_workflow.py Tests - python3 -m unittest discover -s kanban/tests -v: 7/7 passed - python3 tests/verify-doc-links.py: 24 files passed - python3 kanban/migrate_package_origin.py --manifest kanban/mvp-tasks.json --check: zero violations - Python py_compile: passed - Zig 0.16.0 fmt --check: passed - Zig Debug tests: 59/59 passed - Zig ReleaseSafe tests: 59/59 passed - Zig ReleaseSafe build: 19/19 steps passed - git diff --check: passed Compatibility and provenance Repository metadata and individually selected RPM acquisition remain allowed. OCI/LXC/ISO remain output emitters only. No RPM/APT behavior, artifact bytes, registry state, stable namespace, secrets, runners, disks, or live Kanban DB were changed. Base is origin/main 0ef62010c5937ed8ceaadda1dff8e03a05e8b5ca; head is 1110a98d9666e0e982738dde7967870d11b6de69. Residual risks and rollback - The live-board migration is intentionally deferred until this PR is merged and must be run by the coordinator with an explicit --board-db path. - Card classification treats assigned unfinished cards as coding cards and preserves unassigned manual gates byte-for-byte. - Rollback is a revert of this single commit; no external artifact or DB rollback is required.
hermes left a comment

REQUEST CHANGES (Forgejo self-review fallback; formal REQUEST_CHANGES was refused with HTTP 422) — reviewed exact head 1110a98d9666e0e982738dde7967870d11b6de69

Blocking finding

  1. kanban/tests/test_package_origin_policy.py:129-132 is coupled to the live board being not yet migrated. The intended coordinator action makes migrate_board() return 0 on the first call against the copied, already-migrated board, but the test unconditionally requires first > 0. Independent reproduction: migrate a copied live DB once (initial_change_count=61), then use that DB as LIVE_DB; the test fails at line 131 with AssertionError: 0 not greater than 0. Thus the regression suite becomes red immediately after the migration this PR exists to enable.

Required correction

  • Make the copied-board regression deterministic and valid both before and after live migration. Build an explicit pre-migration fixture (for example, remove the canonical block from selected nonterminal coding-card bodies in the copied DB), assert a positive first migration and zero second migration, and separately verify that an already-migrated copy is a zero-change success. Do not rely on mutable live-board preconditions.
  • Make test_manifest_migration_is_idempotent_and_keeps_manual_gates non-vacuous: it currently copies the already-migrated canonical manifest, so first is normally 0 and assertGreaterEqual(first, 0) proves no migration behavior. Construct missing-policy coding-card input, assert the exact block is added once, then assert the second run is byte-identical/zero-change.
  • Align terminal-body coverage with TERMINAL_STATUSES: preserve and verify both done and cancelled bodies, and use the same terminal definition when selecting rows asserted to contain the policy.

Independent checks

  • Complete 9-file API diff and surrounding migration/test source reviewed.
  • PR metadata verified: hermes/multi-alt, base main at 0ef62010c5937ed8ceaadda1dff8e03a05e8b5ca, branch kanban/t_3d75d441-package-origin-policy, exact markers present, one commit at the reviewed head.
  • Existing Python suite: 7/7 passed before the intended live migration; doc links, manifest check, py_compile, and git diff check passed.
  • Zig 0.16.0: fmt passed; Debug and ReleaseSafe tests 59/59; ReleaseSafe build 19/19.
  • Exact-head Forgejo evidence: zero statuses and zero Actions runs; no stale CI result was used.
REQUEST CHANGES (Forgejo self-review fallback; formal REQUEST_CHANGES was refused with HTTP 422) — reviewed exact head `1110a98d9666e0e982738dde7967870d11b6de69` Blocking finding 1. `kanban/tests/test_package_origin_policy.py:129-132` is coupled to the live board being not yet migrated. The intended coordinator action makes `migrate_board()` return 0 on the first call against the copied, already-migrated board, but the test unconditionally requires `first > 0`. Independent reproduction: migrate a copied live DB once (`initial_change_count=61`), then use that DB as `LIVE_DB`; the test fails at line 131 with `AssertionError: 0 not greater than 0`. Thus the regression suite becomes red immediately after the migration this PR exists to enable. Required correction - Make the copied-board regression deterministic and valid both before and after live migration. Build an explicit pre-migration fixture (for example, remove the canonical block from selected nonterminal coding-card bodies in the copied DB), assert a positive first migration and zero second migration, and separately verify that an already-migrated copy is a zero-change success. Do not rely on mutable live-board preconditions. - Make `test_manifest_migration_is_idempotent_and_keeps_manual_gates` non-vacuous: it currently copies the already-migrated canonical manifest, so `first` is normally 0 and `assertGreaterEqual(first, 0)` proves no migration behavior. Construct missing-policy coding-card input, assert the exact block is added once, then assert the second run is byte-identical/zero-change. - Align terminal-body coverage with `TERMINAL_STATUSES`: preserve and verify both `done` and `cancelled` bodies, and use the same terminal definition when selecting rows asserted to contain the policy. Independent checks - Complete 9-file API diff and surrounding migration/test source reviewed. - PR metadata verified: `hermes/multi-alt`, base `main` at `0ef62010c5937ed8ceaadda1dff8e03a05e8b5ca`, branch `kanban/t_3d75d441-package-origin-policy`, exact markers present, one commit at the reviewed head. - Existing Python suite: 7/7 passed before the intended live migration; doc links, manifest check, py_compile, and git diff check passed. - Zig 0.16.0: fmt passed; Debug and ReleaseSafe tests 59/59; ReleaseSafe build 19/19. - Exact-head Forgejo evidence: zero statuses and zero Actions runs; no stale CI result was used.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin kanban/t_3d75d441-package-origin-policy:kanban/t_3d75d441-package-origin-policy
git switch kanban/t_3d75d441-package-origin-policy
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
hermes/multi-alt!3
No description provided.