Skip to content

feat(tasks): compose admission-backed submissions - #325

Merged
abiorh-claw merged 9 commits into
mainfrom
codex/ws-arch-001-02f-task-submission-composition
Aug 12, 2026
Merged

abiorh-claw merged 9 commits into
mainfrom
codex/ws-arch-001-02f-task-submission-composition

Conversation

@Abiorh001

@Abiorh001 Abiorh001 commented Aug 12, 2026 •

Copy link
Copy Markdown
Collaborator

Intent

Implement WS-ARCH-001-02F: the hidden TASK-owned immutable Submission command and one atomic TASK/ART transaction.

Scope

  • typed TASK-owned command, authority, and artifact participant ports
  • one deny-only production authority adapter
  • TASK-owned Submission allocation/persistence
  • ART public-port translation at the composition root
  • canonical admission/binding/content/assignment lineage migration
  • focused ordering, denial, rollback-participation, architecture, and migration proof

Safety

  • no public route or AUTH action activation
  • no AUTH handles or raw authorization context cross into TASK
  • no private ART imports in TASK
  • pre-submit checker evidence remains immutable prerequisite state
  • legacy package hash is nullable rather than fabricated on the canonical path

Verification

  • Ruff: pass
  • focused command tests: 3 passed, 93% command coverage
  • protected-base module boundaries: pass
  • stale authorization/artifact scans: pass
  • Markdown links and diff check: pass
  • full database/coverage proof: GitHub Actions

Human review focus

Transaction ownership, denial before state revelation, TASK lifecycle ownership, ART public-port translation, lock order, rollback semantics, and continued route unreachability.

Summary by CodeRabbit

  • Data Model

    • Submission records now preserve links to task assignments, artifact admissions, bindings, and immutable artifact content.
    • Legacy package hash information may now be omitted when canonical artifact lineage is available.
    • Lineage relationships are validated for consistency, preventing incomplete or mismatched records.
  • Reliability

    • Submission creation maintains transactional consistency, including rollback when authorization or artifact processing is denied.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Abiorh001, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 10 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6660d520-95ee-4545-a2f1-58e2d8e40110

📥 Commits

Reviewing files that changed from the base of the PR and between e81ebaf and bad8ff2.

📒 Files selected for processing (9)
  • .agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/chunks/WS-ARCH-001-02F-task-submission-composition.md
  • .agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/reviews/WS-ARCH-001-02F-external-review-response.md
  • .ci/behavior-ownership/partition.v1.json
  • backend/alembic/versions/0003_submission_artifact_lineage.py
  • backend/app/adapters/tasks/__init__.py
  • backend/scripts/behavior_ownership.py
  • backend/tests/conftest.py
  • backend/tests/test_alembic.py
  • backend/tests/test_artifact_bindings_db.py
📝 Walkthrough

Walkthrough

The PR adds TASK-owned atomic Submission composition, immutable command contracts, artifact lineage persistence, deny-only authorization adapters, migration updates, and tests for ordering, rollback, revision binding, and schema constraints.

Changes

Submission composition

Layer / File(s) Summary
Submission contracts and lineage schema
backend/app/modules/tasks/api/*, backend/app/modules/tasks/models.py, backend/alembic/..., backend/tests/*migration_contract*
Adds immutable creation contracts, canonical artifact lineage fields, integrity constraints, indexes, and migration 0003_submission_lineage.
Atomic TASK creation flow
backend/app/modules/tasks/submission_composition.py, backend/app/modules/tasks/service.py, backend/app/adapters/tasks/*, .ci/*, backend/scripts/*
Adds transactional submission creation, deny-only authorization, artifact-admission adaptation, ownership registration, and submission construction wiring.
Schema and composition validation
backend/tests/test_alembic.py, backend/tests/test_submission_composition.py, backend/tests/test_artifact_bindings_db.py
Tests migration structure, operation ordering, denial, rollback, revision versioning, and exact predecessor binding.
Boundary and completion records
.agent-loop/..., docs/architecture_data_model.md
Records 02F completion, the next 02G boundary, the transaction manifest, and canonical Submission lineage semantics.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Command as TransactionalSubmissionCreationCommand
  participant Service as TaskSubmissionCreationService
  participant Admission as ArtifactAdmissionPort
  participant DB as Database
  Command->>Service: create(request)
  Service->>DB: lock task context and persist Submission
  Service->>Admission: consume admission
  Admission->>DB: persist artifact lineage
  Service->>DB: flush and consume final authority
Loading

Possibly related PRs

Suggested reviewers: abiorh-claw

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains intent, scope, safety, verification, and review focus, but it omits most required trust-bundle sections and the required chunk merge-state proof. Add the required template sections, including Chunk, Goal, What Changed, Evidence, Acceptance Criteria Proof, reviewer results, CI integrity, risks, follow-up work, and merge ownership.
Docstring Coverage ⚠️ Warning Docstring coverage is 15.63% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: composing admission-backed submissions in TASK.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/ws-arch-001-02f-task-submission-composition

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.

@coderabbitai coderabbitai 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.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
@.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/chunks/WS-ARCH-001-02F-task-submission-composition.md:
- Around line 45-57: The allowed-file list for the task submission composition
chunk omits changed paths. Add backend/tests/test_artifact_bindings_db.py,
.agent-loop/CURRENT_STATE.md, and the initiative’s CHUNK_MAP.md and STATUS.md to
the contract’s approved mutation scope before marking the chunk complete, while
preserving the existing contract metadata.

In `@backend/alembic/versions/0003_submission_artifact_lineage.py`:
- Around line 35-42: Update the constraint name argument in the
op.create_check_constraint call for submissions so it uses the logical name
artifact_lineage_shape, allowing the naming convention to produce
ck_submissions_artifact_lineage_shape and match the ORM declaration.

In `@backend/tests/test_alembic.py`:
- Around line 142-160: Restrict the metadata queries assigning lineage_shape,
objects, and package_nullable to the public schema by adding the appropriate
schema filters and ensuring submissions resolves to public.submissions. Preserve
the existing constraint, index, and column checks while preventing same-named
objects in other schemas from satisfying them.

In `@backend/tests/test_artifact_bindings_db.py`:
- Around line 188-195: Update the test setup around _set_schema and
TransactionalSubmissionCreationCommand.create so schema configuration does not
leave an active SQLAlchemy transaction that causes create to fail before
authorization. Configure the search path directly on the connection or within
the command’s root transaction, and do not commit after SET LOCAL because the
setting must remain active.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 23155a98-b089-4d8a-8abb-cd4beefb00e4

📥 Commits

Reviewing files that changed from the base of the PR and between c99976b and e81ebaf.

📒 Files selected for processing (24)
  • .agent-loop/CURRENT_STATE.md
  • .agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/CHUNK_MAP.md
  • .agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/STATUS.md
  • .agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/chunks/WS-ARCH-001-02F-task-submission-composition.md
  • .agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/evidence/WS-ARCH-001-02F-transaction-manifest.md
  • .ci/behavior-ownership/partition.v1.json
  • .ci/module-boundaries/private-edge-debt.v1.json
  • backend/alembic/env.py
  • backend/alembic/versions/0003_submission_artifact_lineage.py
  • backend/app/adapters/tasks/__init__.py
  • backend/app/adapters/tasks/submission_composition.py
  • backend/app/modules/tasks/api/__init__.py
  • backend/app/modules/tasks/api/submission_command.py
  • backend/app/modules/tasks/models.py
  • backend/app/modules/tasks/service.py
  • backend/app/modules/tasks/submission_composition.py
  • backend/scripts/behavior_ownership.py
  • backend/scripts/run_test_lanes.py
  • backend/tests/authorization/guide_compilation/test_migration_contract.py
  • backend/tests/projects/guide_compilation/test_migration_contract.py
  • backend/tests/test_alembic.py
  • backend/tests/test_artifact_bindings_db.py
  • backend/tests/test_submission_composition.py
  • docs/architecture_data_model.md

Comment thread backend/alembic/versions/0003_submission_artifact_lineage.py
Comment thread backend/tests/test_alembic.py
Comment thread backend/tests/test_artifact_bindings_db.py
@abiorh-claw
abiorh-claw self-requested a review August 12, 2026 12:17
@abiorh-claw
abiorh-claw merged commit e59e290 into main Aug 12, 2026
11 checks passed
@abiorh-claw
abiorh-claw deleted the codex/ws-arch-001-02f-task-submission-composition branch August 12, 2026 12:30
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.

2 participants