Repository navigation
feat(tasks): compose admission-backed submissions - #325
Conversation
|
Warning Review limit reached
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 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (9)
📝 WalkthroughWalkthroughThe 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. ChangesSubmission composition
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
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
📒 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.jsonbackend/alembic/env.pybackend/alembic/versions/0003_submission_artifact_lineage.pybackend/app/adapters/tasks/__init__.pybackend/app/adapters/tasks/submission_composition.pybackend/app/modules/tasks/api/__init__.pybackend/app/modules/tasks/api/submission_command.pybackend/app/modules/tasks/models.pybackend/app/modules/tasks/service.pybackend/app/modules/tasks/submission_composition.pybackend/scripts/behavior_ownership.pybackend/scripts/run_test_lanes.pybackend/tests/authorization/guide_compilation/test_migration_contract.pybackend/tests/projects/guide_compilation/test_migration_contract.pybackend/tests/test_alembic.pybackend/tests/test_artifact_bindings_db.pybackend/tests/test_submission_composition.pydocs/architecture_data_model.md
Intent
Implement WS-ARCH-001-02F: the hidden TASK-owned immutable Submission command and one atomic TASK/ART transaction.
Scope
Safety
Verification
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
Reliability