Skip to content

Add approval API action routes - #73

Merged
Alajmah merged 2 commits into
mainfrom
api46-actions
Jun 8, 2026
Merged

Alajmah merged 2 commits into
mainfrom
api46-actions

Conversation

@Alajmah

@Alajmah Alajmah commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the remaining local approval API endpoints.

Changes

  • Adds approve route for approval artifacts.
  • Adds reject route for approval artifacts.
  • Adds tests for success and error behavior.

Completes #46.

Validation

CI should run on this PR.

@gitwire-hq gitwire-hq Bot added the size/M label Jun 7, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a1c992cd6a

ℹ️ 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".

@app.post("/approvals/{approval_id}/approve", response_model=ApprovalRequest)
def approve_approval(approval_id: str) -> ApprovalRequest:
try:
return ApprovalStore(root).approve(approval_id)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Record API approval decisions in the activity log

When an approval is resolved through either new HTTP route, the store is mutated and the function returns without appending a PATCH_APPROVED or PATCH_REJECTED event to ActivityRecordStore. The equivalent CLI paths explicitly append these events in src/sovereign_cortex/cli.py, so API-driven decisions leave the activity JSONL lifecycle incomplete and cannot be correlated or replayed with the original approval request.

Useful? React with 👍 / 👎.

@Alajmah
Alajmah merged commit 19415de into main Jun 8, 2026
2 checks passed
@Alajmah
Alajmah deleted the api46-actions branch June 8, 2026 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant