Skip to content
Agent Delivery Studio
  1. Plannerstate: Complete
  2. DB Designerstate: Complete
  3. Reviewstate: Not started · no automated review recorded for this stage
  4. Fixstate: Not started
  5. Human gatestate: Waiting · ready for review (current step)

MP-723

Formulation - Formulas - Operating procedures - Ticket 1 : free-text procedures (general, per phase, per line) and phase rename (frontend + db + backend)

Ready for review · human_gate
Jira status
DB Review
Stage
Human review
Your move
Ready for review — non-blocking recommendations are available.

Ready for your review in Jira (DB Review) since 1 hour.

Current: Agent run on 2026-10-17 11:00Z (1 hour ago).

Jira
Jira confirmed
Jira read
Lifecycle activity
· Agent run

Database design to review

What was produced: the DB Designer’s deliverable. The plan further down is what the Planner requested.

Migrations
Design only — no migration included

Why no schema change is needed (the DB Designer)

Agent-generated evidence — verify before acting

migrations is empty because no migration FILE belongs to this stage, not because no schema change is needed. This repository's lifecycle has the designer produce the design document, with illustrative SQL only; the canonical migration is authored by the Backend Builder AFTER a human approves it at DB Review. The stage plan makes it a hard limit ('Design document only - no Flyway file, no entity, no backend or frontend code'; 'Next free Flyway version is V035; name it, do not create it'). The schema change proposed, for that migration to carry: ONE file at V035 (V034 is the highest at the base; out-of-order is false, so re-check before merge) with three ADD COLUMN statements - formula.operating_procedure TEXT (AC1), formula_phase.operating_procedure TEXT (AC2), formula_phase_line.instruction TEXT (AC3). Each nullable, no default, no backfill, so it is metadata-only and cannot abort on populated tables. TEXT not VARCHAR(n) because AC13 forbids a length limit. No new table, index, constraint, FK, enum or reference-data row; no existing column changed. One String entity field per table lands in the same change, mapped columnDefinition = "TEXT" with no length. Four criteria need no schema, recorded so the Backend stage invents none: AC6/AC7 reuse formula_phase.label and its per-formula unique constraint on trimmed labels, AC9 the composition lock guard, AC11 formula_audit_event with its seeded ATTRIBUTE_MODIFIED type. AC4, AC5 and AC10 are client view state, persisted nowhere. Gate: four read-only critics, five rounds, one anonymous peer round. No BLOCKER and no schema error in any round. Round 5's three fixes landed after the bound was reached and are not themselves critic-verified; all three correct prose contradictions and are listed in section 12. context7 was down all run, so four version claims are marked unverified upstream and grounded in-repo instead. Five open questions are flagged for DB Review; only OQ2 and OQ1 could change V035.

API impact
8 API impacts described
Published commit
e4c9973a34fa · Broker receipt push-1343
API impacts8

Agent-generated evidence — verify before acting

EndpointChangeReason
GET /v1/formulas/{formulaId}/proceduresNew endpoint. Returns { formulaId, general, byPhaseId, byLineId } read from the three new columns in one pass: formula.operating_procedure, plus the per-phase and per-line projections keyed by formula_phase.id and formula_phase_line.id.The approved mock's getFormulaProcedures pins this signature. Served by the formula PK read plus the composition read that idx_formula_phase_line_formula_id and uq_formula_phase_formula_label's leading formula_id already serve, so no new index.
PUT /v1/formulas/{formulaId}/procedures/generalNew endpoint. Writes formula.operating_procedure. NULL means not set and the response serves ""; a blank or whitespace-only write is stored as NULL.AC1. The empty convention follows FormulaCompositionService#normalizeLot so that 'not set' has one spelling in the database; this differs from formula.notes, which stores '' (disclosed as OQ3).
PUT /v1/formulas/{formulaId}/phases/{phaseId}/procedureNew endpoint. Writes formula_phase.operating_procedure WHERE id = phaseId. Refused on a locked composition by the existing loadUnlockedFormula guard.AC2 and AC9. Keyed on the phase id, not the label, so AC6's rename keeps the procedure; no new lock mechanism and no new column for the lock.
PUT /v1/formulas/{formulaId}/lines/{lineId}/instructionNew endpoint. Writes formula_phase_line.instruction WHERE id = lineId. Must NOT be refused when the line holds no raw material.AC3. The instruction rides the line row's identity, so a reorder, a phase-cell change, a drag and a phase rename all leave it on its line. rawmaterial_id is nullable (V032:67) and the approved mock renders an editable area for a material-less line.
PATCH /v1/formulas/{formulaId}/phases/{phaseId}New route. Updates formula_phase.label on one row, keeping its id and sort_order. Must apply normalizePhase's strip() and MAX_LABEL_LENGTH refusal before its uniqueness pre-check and before the UPDATE.AC6 and AC7, with no schema change: uq_formula_phase_formula_label (formula_id, label) is already the 'already used' rule. The constraint compares raw strings, so without the same trimming a rename to "Phase A " would sit beside "Phase A" - the artefact V032:27-30 exists to prevent.
POST /v1/formulas (duplicate modes) - FormulaService#create, FormulaPhaseRepository#copyPhases, FormulaPhaseLineRepository#copyLinesBoth native INSERT ... SELECT statements must add the new column to their enumerated column list and SELECT (p.operating_procedure, l.instruction - NOT NULL, unlike lot and batch). FormulaService#create must set operatingProcedure from source.getOperatingProcedure() when duplicating.AC12, and the one way this design fails silently: an unlisted column is not copied, with no error anywhere. copyComposition never touches the formula row and create builds the entity from request.notes(), so the general procedure is not copied by the composition path. Needs a duplication test.
GET /v1/formulas/{id}/audit-events (existing read; new entries written on every procedure write and rename)No schema change. Raise ATTRIBUTE_MODIFIED events through FormulaAuditService#recordAttributeModified, with a fixed field key in attribute, the texts in previous_value / new_value (both TEXT, so AC11 and AC13 compose), and the subject in detail (TEXT).AC11 asks for how attribute changes are recorded today, so no event type is seeded and V035 stays pure DDL. attribute is VARCHAR(100) and a label can be 255 chars, so the identifier goes in detail, carrying the line's id as text (a name can be NULL, a position is rewritten by renumber()). See OQ2.
All five procedure routes, on a locked compositionNo schema change. Every procedure write and the rename go through the existing FormulaCompositionService#loadUnlockedFormula guard, which throws BusinessRuleException("exception.formula.composition.locked") when the formula's status row has locksComposition.AC9 asks the server to refuse these writes the same way it refuses composition writes today. No new column, flag or constraint. Collapse, expand and show/hide-all never write, so the lock does not apply to them.
ProvenanceTechnical
Repository
cosmocomply/monorepo
Published commit
e4c9973a34fa
Push receipt
push-1343
Design document blob
feda0bfa8d4d
Design artifact
workflow-artifact-ee646aab73f213d94edd6466fa5291b05af30390 · ee646aab73f2 · 2026-10-17 11:00Z
Accepted by handoff
workflow-handoff-14c6836068a10c18260514067095a80c · CLEAN · 76dcb6ea034b · 2026-10-17 11:00Z
Validated against contract
manifest.json · bc3106ab2915
Produced by
db-designer-mp-723-14c68360

Required action

Step
Human gate: Waiting (ready for review)
Run
14c6836068a10c18260514067095a80c
Evidence source
gate jira:MP-723:db_review
Stop class
No open stop
Attempt
db|2026-10-17T11:52:37.508+0200 (run 14c6836068a10c18260514067095a80c)
Open requirements
0 open

You

Review needed

Ready for review — non-blocking recommendations are available.

Source freshness

Jira
Jira confirmed · fresh
Jira read
Lifecycle activity
· Agent run · agent-run
Jira updated
Status entered
Newest evidence
· 0 d
Stale after
30 days
Projected

Runs and records timeline

  1. Run db-designer · SUCCEEDED

    db-designer-mp-723-14c68360 · ed0ae3200407 · $38.6832 · run

  2. Handoff design (db) · CLEAN

    workflow-handoff-14c6836068a10c18260514067095a80c · 76dcb6ea034b · run

  3. Run feature-planner · SUCCEEDED

    feature-planner-mp-723-91ca7a8a · 3830b223cba4 · $5.1011 · run

  4. Handoff plan (db) · CLEAN

    workflow-handoff-91ca7a8a7fe6e56a987ba8bac5727da8 · 7a87eb9f4f58 · run

  5. Run pr-reviewer · SUCCEEDED

    pr-reviewer-mp-723-532c67a6 · ed0ae3200407 · $2.7031 · run

  6. Artifact review-findings

    workflow-artifact-7141d51ce0280a42082173f6a032a9ae1eda6dc5 · 7141d51ce028 · run

  7. Handoff review (mock) · CLEAN

    workflow-handoff-532c67a6c56042a6d09c2907540ec7d4 · 18915e22959b · run

  8. Run pr-fixer · SUCCEEDED

    pr-fixer-mp-723-a4263396 · 2bbc7d928c7b · $1.2710 · run

  9. Artifact fix-report

    workflow-artifact-e7a3a54a8986ad5ea650cf75ec1d53cdc99c8c59 · e7a3a54a8986 · run

  10. Handoff fix (mock) · CLEAN

    workflow-handoff-a4263396fd5fd74539dc89ce3f798635 · 32fde34d7cc8 · run

  11. Run feature-planner · SUCCEEDED

    feature-planner-mp-723-11030ece · 3830b223cba4 · $0.5890 · run

  12. Handoff plan (mock) · CLEAN

    workflow-handoff-11030ece72702d16adc50543164e856e · a32c02357610 · run

  13. Run pr-reviewer · SUCCEEDED

    pr-reviewer-mp-723-edfba2f3 · 2bbc7d928c7b · $4.7135 · run

  14. Artifact review-findings

    workflow-artifact-af380fc60100098ab8af99f904171d42f2de7c0e · af380fc60100 · run

  15. Handoff review (mock) · CLEAN

    workflow-handoff-edfba2f39704cbd3f0ae3ae6f9761a21 · 960af9cac638 · run

  16. Run mock-builder · SUCCEEDED

    mock-builder-mp-723-c4006912 · 3830b223cba4 · $19.7205 · run

  17. Artifact build-report

    workflow-artifact-e25f4f7d62f3f6012651d2f951233400a6dd5e74 · e25f4f7d62f3 · run

  18. Handoff build (mock) · CLEAN

    workflow-handoff-c40069123986d992abe27875fe36e209 · 16667c9160a6 · run

  19. Run feature-planner · SUCCEEDED

    feature-planner-mp-723-c82c4c11 · 3830b223cba4 · $7.8036 · run

  20. Handoff plan (mock) · CLEAN

    workflow-handoff-c82c4c11c7f81001e5883484e719cefd · 0e2eb845c591 · run

  21. Run feature-planner · FAILED · RAG_SESSION_FAILED: rag-budget-refused: the gateway reported the session FAILED

    feature-planner-mp-723-b977184e · 3830b223cba4 · run

  22. Stop plan (mock) · FAILED · rag-budget-refused

    workflow-failure-b977184e762c009fde441d28c4e49f8e · 2dbb5b07cc77 · run

  23. Run feature-planner · FAILED · RAG_SESSION_FAILED: rag-budget-refused: the gateway reported the session FAILED

    feature-planner-mp-723-b411f510 · 3830b223cba4 · run

  24. Stop plan (mock) · FAILED · rag-budget-refused

    workflow-failure-b411f51057e5977a09afdf7f539092e2 · ea6df44e6e96 · run

Inputs, outputs and lineage

Output commits and push receipts

Local (attempted) commit — diagnostic only
a79cef523105
Published commit (Broker receipt push-1343)
e4c9973a34fa
Verified PR head
e4c9973a34fa · accepted handoff workflow-handoff-14c6836068a10c18260514067095a80c
Output record
workflow-artifact-ee646aab73f213d94edd6466fa5291b05af30390 · db-design · 2026-10-17 11:00Z
Receipt id
push-1343
Audit id
1343
Branch
claude/mock-MP-723-operating-procedures
Expected parent
ed0ae3200407
Remote SHA (from GitHub, via the Broker)
e4c9973a34fa
PR head
e4c9973a34fa
Receipt count
1
Lineage
ed0ae3200407 → e4c9973a34fa
Validation result
accepted · workflow-handoff-14c6836068a10c18260514067095a80c
RoleRecordsha256Status
handoffworkflow-handoff-14c6836068a10c18260514067095a80c76dcb6ea034b3a8ccollected
inputworkflow-artifact-c1567f9c26f39cd10467df7601c96663b12a62d9c1567f9c26f39cd1ok
artifactworkflow-artifact-ee646aab73f213d94edd6466fa5291b05af30390ee646aab73f213d9ok
handoffworkflow-handoff-14c6836068a10c18260514067095a80c76dcb6ea034b3a8cok

Agent work requests and routing evidence

Agent work request · Completed2026-10-16 14:37Z · requested by admin systemease

The agent work for your request has finished.

Human request text — verbatim from Jira (secrets masked)
Resume work on PR #151 (branch claude/mock-MP-723-operating-procedures). Apply the PO test finding of 2026-10-16. # Composition grid, line instruction area (line-instruction-row.tsx) and phase procedure area (phase-procedure-row.tsx): the "Edit" link is right-aligned in a full-width row and is off-screen when the grid scrolls horizontally. Expected: the "Edit" link sits immediately after the area title on the left, visible without horizontal scrolling, in both areas. (AC2, AC3, PO decision 2026-10-16) Do not change the general "Operating procedure" panel, the edit/read-mode rules, or anything else in the PR.

Next: Nothing to do.

Routing
FIX_WITHIN_SCOPE → decision FIX_WITHIN_SCOPE
Human finding
H1 MAJOR acceptance-criterion H2 MAJOR acceptance-criterion · workflow-artifact-c2ce39a8d229acf3c197b1754762bf25abcfc23d · c2ce39a8d229
Fix
2 applied (H1, H2), 0 unresolved · workflow-artifact-e7a3a54a8986ad5ea650cf75ec1d53cdc99c8c59 · e7a3a54a8986
Plan revision
sha256:8159c3f7c2feaca2be2a944830feaa58a6dd280a144e14b0acb15d22f0c39821 · accepted plan feature-contract-c82c4c11c7f81001e5883484e719cefd · c89d0fd2da71
Bound PR / SHA
#151 @ 2bbc7d928c7b
Lifecycle
Completed · 2026-10-16 15:03Z · Mock · request attempt (request event 17792)
Triage RAG context
revision 6ff9aee4994f · indexed 3830b223cba4 · freshness EXACT · triage started 2026-10-16 14:47Z

Triage rationale

Agent-generated evidence — verify before acting

The request applies PO test decision C1 of 2026-10-16 (ticket comment 14074), which is already written into the ticket snapshot as an accepted criterion: AC2 states "The 'Edit' control of the phase procedure area and of the line instruction area (AC3) sits next to the area title, visible without horizontal scrolling of the grid. (PO decision 2026-10-16)". So this is an accepted criterion that is not met at head 2bbc7d92, not a new requirement. It needs no change to the accepted plan: the mock contract's frontend-plan already creates phase-procedure-row.tsx ("a sibling TableRow with COMPOSITION_COLUMN_COUNT colSpan ... shows the text and, in edit mode, the shared editor") and line-instruction-row.tsx ("a sibling colSpan TableRow ... editable in edit mode"), and nowhere fixes where the Edit control sits inside those rows. Placing it immediately after the area title is a layout detail inside two components the plan already owns, so a Fixer can satisfy it within the accepted plan. Two findings, one per named component, both acceptance-criterion (never MINOR). MAJOR rather than BLOCKER: editing still works, but only after horizontal scrolling of a grid wider than the screen, which AC2 now forbids. The request's fence (do not touch the general "Operating procedure" panel, the edit/read-mode rules, or anything else in the PR) is carried into each finding. Note on evidence: this run can read only the base at workSha 3830b223; the PR head is not mounted (no overlay, object 2bbc7d92 absent from /work), and neither row component exists at the base. The defect is taken from the PO's own test of the PR #151 preview, which is first-hand evidence at the bound head; the mock review of that same head was CLEAN and reported nothing on this placement, so no finding is withdrawn or superseded.

Human finding (as triaged)

Agent-generated evidence — verify before acting

H1: Phase procedure area: the "Edit" control is right-aligned in the full-width row and off-screen when the grid scrolls horizontally (AC2) H2: Line instruction area: the "Edit" control is right-aligned in the full-width row and off-screen when the grid scrolls horizontally (AC2/AC3)

Event id
17792
Source
jira-changelog · customfield_10223 · 2026-10-16 14:37Z
Request hash (textSha256)
32090c2ba3e905acd08a6304fef90a344896cfdabf08e93707135c09013c12da
Request record
workflow-artifact-human-request-mp-723-17792 · 19cf839a0372ef6e24462debcbe06d7a8d32bc67ee348df5cbb94213ae512b7d
State source
Operator request-progress record
Lifecycle record
workflow-artifact-request-progress-mp-723-17792-completed · 0b55ae3c6affec1f4ee56c612247b40ffa5f053976fb77829955952dbe54956f · completed · next none · attempt mock|request:17792 · run pr-reviewer-mp-723-532c67a6 · 3 records
Triage run
11030ece72702d16adc50543164e856e
Routing artifact
workflow-artifact-545b05a2a18845ea1acda3a262fe923835a66710 · 545b05a2a18845ea1acda3a262fe923835a667101c36f2ff46467368b8b61626
Decision
workflow-artifact-human-request-decision-mp-723-17792 · 87b5cec2b198a6ad540450e9873ae7a4305ea9bc7f6bd573f8423487cded75af · FIX_WITHIN_SCOPE
Operator action
transitioned to Mock In Progress · dispatched pr-fixer · comment none
IdSeverityCategoryFingerprint
H1MAJORacceptance-criterionfp-10d8853b3f3a378c
H2MAJORacceptance-criterionfp-8133f845c69a9f4f
  • 2026-10-16 14:37Z · Request recorded (Operator) · workflow-artifact-human-request-mp-723-17792 · 19cf839a0372
  • 2026-10-16 14:37Z · Lifecycle: Accepted (Operator) · workflow-artifact-request-progress-mp-723-17792-accepted · 55b3dbaa7286
  • 2026-10-16 14:37Z · Lifecycle: Running (Operator) · workflow-artifact-request-progress-mp-723-17792-running · a1a4b96316c7
  • 2026-10-16 14:48Z · Triage routing: FIX_WITHIN_SCOPE (Planner) · workflow-artifact-545b05a2a18845ea1acda3a262fe923835a66710 · 545b05a2a188
  • 2026-10-16 14:49Z · Decision: FIX_WITHIN_SCOPE (Operator) · workflow-artifact-human-request-decision-mp-723-17792 · 87b5cec2b198
  • 2026-10-16 14:49Z · Human finding (Operator) · workflow-artifact-c2ce39a8d229acf3c197b1754762bf25abcfc23d · c2ce39a8d229
  • 2026-10-16 14:54Z · Fix report (Fixer) · workflow-artifact-e7a3a54a8986ad5ea650cf75ec1d53cdc99c8c59 · e7a3a54a8986
  • 2026-10-16 15:03Z · Lifecycle: Completed (Operator) · workflow-artifact-request-progress-mp-723-17792-completed · 0b55ae3c6aff

Review findings and routing

This gate concerns the database design: no automated review is recorded for it, and the human DB review is the check. Accepting the design establishes no implementation or testing outcome.

GPU / RAG sessions and spend

Model cost
$80.5850
GPU cost
$0.3990
Run spend (sum)
$80.5850
Planner 91ca7a8a7fe6 · CLOSED · $0.1540
State
CLOSED
GPU class
A6000
Provider
lium
Requested
2026-10-17T09:53:29Z
Ready
2026-10-17T10:00:54Z
Closed
2026-10-17T10:14:43Z
Estimated GPU cost
$0.1540
Budget cap
$10.00
Cleanup
VERIFIED
Provisioning deadline
2026-10-17T10:23:29Z
Session deadline
2026-10-17T11:13:29Z
Session id (hash)
20741ce9b974
Session binding
ded873ff41b4
Planner c82c4c11c7f8 · CLOSED · $0.1680
State
CLOSED
GPU class
A6000
Provider
lium
Requested
2026-10-15T19:01:18Z
Ready
2026-10-15T19:08:40Z
Closed
2026-10-15T19:25:07Z
Estimated GPU cost
$0.1680
Budget cap
$10.00
Cleanup
VERIFIED
Provisioning deadline
2026-10-15T19:31:18Z
Session deadline
2026-10-15T20:21:18Z
Session id (hash)
f20ec08535fa
Session binding
9f67c087e79a
Planner b977184e762c · FAILED · $0.0000
State
FAILED
Provider
lium
Requested
2026-10-15T17:52:00Z
Closed
2026-10-15T17:52:06Z
Estimated GPU cost
$0.0000
Budget cap
$10.00
Cleanup
VERIFIED
Rule
rag-budget-refused
Provisioning deadline
2026-10-15T18:22:00Z
Session deadline
2026-10-15T19:12:00Z
Session id (hash)
37f489900ca8
Session binding
1fa1326507ab
Planner b411f51057e5 · FAILED · $0.0000
State
FAILED
Provider
lium
Requested
2026-10-15T15:21:40Z
Closed
2026-10-15T15:21:45Z
Estimated GPU cost
$0.0000
Budget cap
$10.00
Cleanup
VERIFIED
Rule
rag-budget-refused
Provisioning deadline
2026-10-15T15:51:40Z
Session deadline
2026-10-15T16:41:40Z
Session id (hash)
a187479f7444
Session binding
5de008251cb2
Planner 11030ece7270 · CLOSED · $0.0770
State
CLOSED
GPU class
A6000
Provider
lium
Requested
2026-10-16T14:38:01Z
Ready
2026-10-16T14:47:02Z
Closed
2026-10-16T14:49:08Z
Estimated GPU cost
$0.0770
Budget cap
$10.00
Cleanup
VERIFIED
Provisioning deadline
2026-10-16T15:08:01Z
Session deadline
2026-10-16T15:58:01Z
Session id (hash)
92b8d9a8e1b1
Session binding
edf2e2068bb2

Resume status

Resume available: no open stop record

No Resume event recorded.

Historical attempts

  • Earlier stage Fix: Complete · 2026-10-16 14:54Z · run a4263396fd5fd74539dc89ce3f798635
  • Earlier stage Review: Complete · clean · 2026-10-16 15:03Z · run 532c67a6c56042a6d09c2907540ec7d4
  • History Handoff: Technically validated · Database · 2026-10-17 11:00Z
  • History Handoff: Technically validated · Plan · 2026-10-17 10:14Z
  • History Handoff: Technically validated · Review · 2026-10-16 15:03Z
  • History Handoff: Technically validated · Review · 2026-10-16 14:54Z
  • History Handoff: Technically validated · Plan · 2026-10-16 14:48Z
  • History Handoff: Technically validated · Review · 2026-10-15 20:20Z
  • History Handoff: Technically validated · Mock · 2026-10-15 20:07Z
  • History Handoff: Technically validated · Plan · 2026-10-15 19:24Z
  • History Stop record: Technical failure, no work lost · Plan · 2026-10-15 17:52Z
  • History Stop record: Technical failure, no work lost · Plan · 2026-10-15 15:21Z

Raw records and logs

Raw

Projected 2026-10-17 12:01Z · Operations view · All workflows