Skip to content

feat: add revision-bound signal decisions - #76

Open
roodboi wants to merge 1 commit into
mainfrom
codex/hack-1033-decision-lifecycle
Open

feat: add revision-bound signal decisions#76
roodboi wants to merge 1 commit into
mainfrom
codex/hack-1033-decision-lifecycle

Conversation

@roodboi

@roodboi roodboi commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements the approved HACK-1033 capability evolution.

  • adds a closed fclt ai loop decide and activity_decide JSON/MCP lifecycle for accept, redirect, reject, and defer
  • atomically records revision-bound, portable machine-local receipts under the existing evolution-loop lock
  • revalidates locator, scope/root/runtime identity, issued activity, queue revision, approval source, and lifecycle history; rejects stale, replayed, moved-root, cross-scope, duplicate, malformed, unsafe, and non-signal inputs
  • preserves bounded target, evidence, linked-work, expected-outcome, verification, and next-action context for external work-unit construction without mutating capability, Git, trackers, proposals, tasks, or external systems
  • adds exact fixtures for the four already-landed approved signal families, the explicit hold, and six stale Git cursors while preserving coverage/freshness separation
  • updates CLI/plugin references, capability declarations/matrix, operating-model guidance, and generated built-ins

Linear: https://linear.app/hackdance/issue/HACK-1033

Verification

Passed:

  • bun run check
  • bun run type-check
  • focused activity decision, reconciliation, MCP/plugin, protocol, CLI paths, built-in, remote, path, and doctor suites
  • bun run build
  • bun run build:verify
  • bun run pack:dry-run
  • compiled binary help smoke for ai loop decide
  • git diff --check and changed-line privacy scan
  • isolated project enrollment timeout rerun: 1/1 passed
  • isolated read-only audit timeout rerun: 1/1 passed

Bounded full-suite evidence:

  • first run completed in 423.52s: 1,000 passed, 18 failed; failures were one concurrent enrollment timeout plus audit-fix baseline failures
  • second run completed in 257.71s: 994 passed, 2 audit-only 5s timeouts
  • pre-commit rerun completed in 222.18s: 1,001 passed, 17 audit-fix baseline failures
  • a representative audit-fix failure reproduces with the same error on an untouched origin/main archive: Selected finding has no exact report-authorized remediation binding
  • this PR changes no audit implementation or audit fixture files

Behavior and boundaries

The receipt is append-only lifecycle evidence. It does not implement the decision, grant authority, apply a proposal, mutate canonical capability, call Git/Linear/external systems, or spawn work. A later receipt requires a genuinely newer signal queue revision. A hold/defer remains visible and unimplemented.

Coverage completeness and cursor freshness remain independent in JSON, activity output, persisted reconciliation reports, fixtures, and aggregate behavior.

Rollback

Revert commit cdd978a. Existing machine-local decision receipts are retained as history; no canonical or external data migration is introduced.

Release note

Adds revision-bound signal-family decision receipts and explicit coverage-versus-freshness reconciliation behavior. Semantic release will derive the feature release from the Conventional Commit after merge; this PR does not release or deploy.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@linear-code

linear-code Bot commented Aug 5, 2026

Copy link
Copy Markdown

HACK-1033

@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: cdd978a658

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

Comment thread src/activity-action.ts
Comment on lines +558 to +560
resource.kind === "signal"
? "Record an approved signal decision only through loop decide with this locator and the exact expected queue revision; the receipt does not implement the decision."
: "Do not invoke a mutation from this plan; proposal and coverage lifecycle changes remain separate closed workflows.",

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 Mark signal decisions as approval-required

When the locator is for a signal item, activityActionClass() returns handoff, so this new signal-specific resolve plan still serializes mutation.approvalRequired: false even though decideActivityAction() rejects every decision without approve=true. Consumers that use the resolve JSON to decide whether to show or require approval will suppress the required approval prompt or misstate the safety boundary for signal decisions; set the approval flag true for signal resources.

AGENTS.md reference: AGENTS.md:L130-L130

Useful? React with 👍 / 👎.

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.

1 participant