agent/proposal-review-api-complete #8

Closed
opened 2026-05-09 23:23:33 +02:00 by codex · 1 comment
Collaborator

Parent: #2
Wave: 1 Maintainer Foundation

Summary

Make proposal-first complete and reliable at API level.

Scope

  • Add or verify list/get proposal endpoints.
  • Add audit events for approve/reject decisions.
  • Ensure apply_approved_update is idempotent.
  • Prevent applying rejected or already applied proposals.
  • Preserve action preview for UI.

Non-goals

  • No proposal UI in this PR; see #9.
  • No broad bulk mutation.
  • No archive/delete proposals until separately approved.

Acceptance

  • Iskra can propose a board update.
  • Piotr can approve/reject through API.
  • Approved proposal applies semantically once.
  • All transitions are audited.

Tests / smoke

  • Router tests for create/list/get/approve/reject/apply.
  • Idempotency tests for apply.

Rollback

  • git revert <PR-commit>; migration-specific rollback if schema changes.

Owner gates

  • DB migration approval if schema changes.
Parent: #2 Wave: 1 Maintainer Foundation ## Summary Make proposal-first complete and reliable at API level. ## Scope - Add or verify list/get proposal endpoints. - Add audit events for approve/reject decisions. - Ensure `apply_approved_update` is idempotent. - Prevent applying rejected or already applied proposals. - Preserve action preview for UI. ## Non-goals - No proposal UI in this PR; see #9. - No broad bulk mutation. - No archive/delete proposals until separately approved. ## Acceptance - Iskra can propose a board update. - Piotr can approve/reject through API. - Approved proposal applies semantically once. - All transitions are audited. ## Tests / smoke - Router tests for create/list/get/approve/reject/apply. - Idempotency tests for apply. ## Rollback - `git revert <PR-commit>`; migration-specific rollback if schema changes. ## Owner gates - DB migration approval if schema changes.
Author
Collaborator

Opened PR #32: #32

Implemented the proposal review API slice:

  • listProposals and getProposal for human-authenticated review
  • proposal-mode audit events for approve/reject
  • idempotent replay for applyApprovedUpdate
  • scope checks before idempotency replay
  • repository proposal listing
  • contract docs update

Validation run:

  • pnpm --filter @kan/db build
  • pnpm --filter @kan/db typecheck
  • pnpm --filter @kan/api typecheck
  • pnpm --filter @kan/mcp typecheck
  • pnpm --filter @kan/api test -- agent.test.ts integration-tests/agent.integration.test.ts
  • pnpm exec prettier --check packages/db/src/repository/agent.repo.ts packages/api/src/routers/agent.ts packages/api/src/routers/agent.test.ts packages/api/integration-tests/agent.integration.test.ts docs/agent-mcp-contract.md
  • git diff --check

No schema migration, no production deploy.

Opened PR #32: https://git.pdurlej.com/pdurlej/kan-ductor/pulls/32 Implemented the proposal review API slice: - `listProposals` and `getProposal` for human-authenticated review - proposal-mode audit events for approve/reject - idempotent replay for `applyApprovedUpdate` - scope checks before idempotency replay - repository proposal listing - contract docs update Validation run: - `pnpm --filter @kan/db build` - `pnpm --filter @kan/db typecheck` - `pnpm --filter @kan/api typecheck` - `pnpm --filter @kan/mcp typecheck` - `pnpm --filter @kan/api test -- agent.test.ts integration-tests/agent.integration.test.ts` - `pnpm exec prettier --check packages/db/src/repository/agent.repo.ts packages/api/src/routers/agent.ts packages/api/src/routers/agent.test.ts packages/api/integration-tests/agent.integration.test.ts docs/agent-mcp-contract.md` - `git diff --check` No schema migration, no production deploy.
Sign in to join this conversation.
No labels
3plus3-followup
agent/claude-code
agent/codex
agent/hermes
agent/iskra
agent/ollama
agent/patchwarden
analytics
api
cockpit
dependency/blocked
dependency/blocks-others
dependency/cross-repo
dependency/needs-confirmation
docs
domain:agents
domain:ci
domain:docs
domain:forgejo
domain:infra
domain:memory
domain:runtime
domain:signal
domain:ux
flow/architecture
flow/blocked
flow/deployed
flow/done
flow/implementation
flow/intake
flow/maintained
flow/observed
flow/ready
flow/refining
flow/retired
flow/review
gemini-flash
judge/codex-candidate
judge/hermes-candidate
judge/low-confidence
judge/needs-refinement
judge/operator-needed
judge/p0
judge/p1
judge/p2
judge/p3
judge/park
judge/patchwarden-candidate
judge/stale-priority
kind/adr
kind/bug
kind/chore
kind/feature
kind/infra
kind/ops
kind/refactor
kind/research
leviathan
mcp
merge/auto
merge/manual
merge/manual-dependency-conflict
merge/manual-failing-tests
merge/manual-merge-conflict
merge/manual-missing-review
merge/manual-operator-preference
merge/manual-red-zone
merge/manual-security-sensitive
merge/manual-unclear-scope
merge/manual-unknown
mode:operator-only
mode:patchwarden-iskra-approved
mode:safe-auto
observed/erroring
observed/needs-followup
observed/pending
observed/retire-candidate
observed/unused
observed/used
ops
priority:p0
priority:p1
priority:p2
priority:p3
review:claude-reviewed
review:codex-reviewed
review:dziadek-reviewed
review:needs-human
safety
safety:external-write
safety:no-prod-mutation
safety:prod-impact
safety:secret-touch
scout
security
size/large
size/medium
size/small
size/tiny
size/unknown
small-task
source/adr
source/agent-generated
source/manual
source/operator-chat
source/voice-note
status:blocked
status:codex-ready
status:merged:pending-evidence
status:needs-evidence
status:operator-needed
status:parked
tests
tier:0-platform-substrate
tier:1-iskra-value-layer
tier:2-tools-products-modules
type:bug
type:chore
type:docs
type:feat
type:policy
type:research
ui
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
pdurlej/kan-ductor#8
No description provided.