Skip to content

feat(projects): persist authorized guide compilation requests - #355

Merged
Sheys11 merged 16 commits into
mainfrom
agent/ws-v01-next-blocker
Aug 21, 2026
Merged

feat(projects): persist authorized guide compilation requests#355
Sheys11 merged 16 commits into
mainfrom
agent/ws-v01-next-blocker

Conversation

@durutheguru

@duruthegurudurutheguru commented Aug 21, 2026

Copy link
Copy Markdown
Member

Outcome

This PR completes the hidden WS-POL-003-03B persistence boundary. It lets the Projects owner record an authorized guide-compilation request, establish a durable pre-provider dispatch fence, and persist a known accepted result atomically.

The capability remains internal. It exposes no route and starts no external execution.

Design in simple terms

  • Migration 0008_guide_compilation_authorized_persistence adds immutable request-operation and authorization-event custody.
  • The hidden Projects coordinator reuses the existing AUTH public protocol and the POL-03A attempt model.
  • Request, audit, attempt, and receipt changes commit together or roll back together.
  • Exact request and authority digests are reconstructed and enforced by PostgreSQL.
  • Concurrent retries converge on one result instead of creating duplicate state.
  • A first committed dispatch fence returns an explicit one-shot permit. An uncertain replay returns dispatch_permitted=false, reports provider_outcome_unresolved, and never redispatches blindly.
  • Dispatch, result recording, and final persistence each lock and revalidate the current draft guide, exact setup/source lineage, and latest setup generation.

Deliberate non-goals

This PR activates no provider call, public route, approval, review, compensation, contribution, reputation, settlement, or other economic behavior. It also adds no worker, Celery dispatch, outbox message, policy projection, live setup cutover, or public Projects API.

Actual provider execution, redelivery, and same-key reconciliation belong to the next dependency, WS-POL-003-04A, which is recorded but not started here.

Verification

  • All nine internal reviewer tracks passed at exact final head a1e2aaa3ba7e781d30ca7da09d3775af6659ec48 with zero findings.
  • Focused real-PostgreSQL guide-compilation and AUTH tests: 118 passed.
  • Focused branch coverage: 96.27%; every materially changed guide-compilation file is above 90%.
  • Canonical Docker/Linux semantic lanes at the exact final head: 4,111 of 4,111 nodes completed across seven sequential lanes, with no skips, deselections, duplicates, interruptions, timeouts, cancellations, or retries.
  • The independent lane merger and validator passed.
  • Combined repository coverage: 91.17% against the 78% floor.
  • Combined guide-compilation package coverage: 97.78% against the 90% floor; exact files range from 95.24% to 100%.
  • Real services: PostgreSQL 16, Redis 7, and MinIO.
  • Eight seeded defects were detected and restored, including the two external-review regressions: uncertain replay permit and current setup-lineage revalidation.
  • Docker build, Ruff, migration topology, ownership, authorization boundary, lane inventory, Markdown links, stale-document scanners, and atomic chunk-state synchronization passed.

External review remediation

Three valid P1 findings on the first published head are closed in this update:

  1. The dispatch receipt now distinguishes the first one-shot permit from an already-uncertain replay.
  2. Execution now revalidates authoritative current setup lineage before dispatch, outcome recording, and persistence.
  3. Contract and status wording now state the durable completion outcome while preserving human-only merge and protected-main truth.

Review focus

  • Confirm the conservative pre-I/O uncertainty fence is appropriate until WS-POL-003-04A proves provider reconciliation.
  • Confirm request and result persistence remain exact, atomic, and hidden.
  • Confirm no later-product authority or side effect has been pulled into this change.

@coderabbitai

coderabbitaiBot commented Aug 21, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d408b7b0-6ddc-409c-b110-158054e87673


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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:6034e337ac

ℹ️ 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 threadbackend/app/modules/projects/guide_compilation/service.py Outdated
Comment threadbackend/app/modules/projects/guide_compilation/service.py
@Sheys11Sheys11 added area/backend Backend API, data model, migrations, services, repositories focus/v0.1 Current Workstream v0.1 roadmap focus; open to contributors unless explicitly assigned labels Aug 21, 2026
@Sheys11
Sheys11 self-requested a review August 21, 2026 22:15

@Sheys11Sheys11 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All requested changes have been made. lgtm!

@Sheys11
Sheys11 merged commit 116b366 into mainAug 21, 2026
11 checks passed
@Sheys11
Sheys11 deleted the agent/ws-v01-next-blocker branch August 21, 2026 22:21
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/backendBackend API, data model, migrations, services, repositoriesfocus/v0.1Current Workstream v0.1 roadmap focus; open to contributors unless explicitly assigned

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@durutheguru@Sheys11