Skip to content

fix(platform): preserve phase4 runtime invariants#14

Merged
ActiveInAI merged 1 commit into
mainfrom
fix/platform-phase4-runtime-invariant-guards
Apr 30, 2026
Merged

fix(platform): preserve phase4 runtime invariants#14
ActiveInAI merged 1 commit into
mainfrom
fix/platform-phase4-runtime-invariant-guards

Conversation

@ActiveInAI

Copy link
Copy Markdown
Owner

Summary

This PR fixes Phase 4 runtime invariant gaps found after PR #13.

Fixes

  • Rejecting generation review now also rejects the linked lifecycle transaction and generated artifacts.
  • Viewer command ack preserves the command's resolved module scope for audit events.
  • Viewer command ack now has terminal regression coverage.
  • Required viewer command kinds are covered by contract tests.
  • Knowledge Source GitHub Trending URL + refresh policy is validated against the patched final state.
  • LicenseViolation now maps to HTTP 400 instead of HTTP 500.
  • OpenAPI runtime/artifact/viewer examples are expanded.
  • OpenAPI generator side-effect 04-backend/openapitools.json is removed.

Validation

  • cargo fmt --all -- --check
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo test --all-targets --all-features
  • cargo build --release --bin insomeos-gateway
  • npx --yes @redocly/cli@2.30.0 lint openapi.yaml
  • npx --yes @openapitools/openapi-generator-cli@2.23.0 generate -i openapi.yaml -g typescript-fetch -o /tmp/architoken-sdk-ts
  • bun run lint
  • bun run typecheck
  • bun run test
  • bun run build
  • ./04-backend/scripts/smoke-all.sh
  • git diff --check
  • proprietary loader / SDK / EXE policy scan

@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: 51b52fad2f

ℹ️ 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 on lines 912 to +914
job.reviews.push(review);
if req.decision == GenerationReviewDecision::Rejected {
reject_lifecycle(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Reject lifecycle before mutating review state

When decision == Rejected, this method appends to job.reviews before calling reject_lifecycle. If reject_lifecycle returns an error (for example, the linked transaction is no longer in a rejectable state), mutate_job exits early with that error but does not roll back prior in-place mutations, so the job keeps the new review entry even though the API call failed. This creates inconsistent state and can cause duplicate/contradictory review history on retries.

Useful? React with 👍 / 👎.

@ActiveInAI ActiveInAI merged commit 20b43f5 into main Apr 30, 2026
6 checks passed
@ActiveInAI ActiveInAI deleted the fix/platform-phase4-runtime-invariant-guards branch April 30, 2026 09:20
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