feat: lane 6, prep and planning: the prep sheet, the tool margin, History and Planning, J3 and the seed (#732) #858
Loading…
Reference in a new issue
No description provided.
Delete branch "build/lane6-all"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Lane 6 (#732), complete. It follows the owner's answers P1–P12 (D177, D178, D182–D191) and the accepted departure lists b6a, b6b and b6c (D214–D216).
What's in it
/sessions/:id/prep, with redirects from the old/planninglinks (P1);P12 (D191)
d6f8b0c2e4a7dropsgeneration_results.pinned./pinand/unpinroutes are gone; nothing in the frontend called them.Migrations
The chain is re-chained onto main:
c4e6a8b0d2f1 → b8c0d2e4f6a7 → f6a8b0c2d4e5 → a7b9c1d3e5f6 → d6f8b0c2e4a7. There is one head, and up/down/up runs cleanly.Bugs J3 found along the way
land_plannow does it in one commit..delay()inprep_service.draft_plan. It now usesenqueue(#850's guard).Tests
coverage/lane5.py(lane 6's checklist) is fully classified. Its P2 Foundry rows are now deferred to v5.x.Before merge
Once #854 (#851) is on main, main gets merged in again and lane 6's new
Depends(get_db)calls becomescope="function".🤖 Generated with Claude Code
Tests first: GET/PATCH /sessions/{id}/prep with the sheet's own version, migration 3b7e1d9c5a26 (prep_sheets, prep_items, shelf_pins' shelf start and its backfill), and reconcile_pins filling shelves only from a pin's shelf start (P3a). The one-head pin moves to the new migration's test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>Migration 3b7e1d9c5a26 on c3d5e7f9a1b2: prep_sheets (one per session, made on the first save, with its own version for autosave), prep_items (the table only; 1b writes it), and shelf_pins.shelf_start_session_id, backfilled to each pin's start once, when the column is made. GET and PATCH /api/sessions/{id}/prep, GMs of the campaign only (P7). A stale save is a 409 carrying the current sheet. The beats stay in sessions.beat_notes and are saved under the sheet's version; the old beat-notes endpoint moves that version, and a beats save from the sheet moves the old endpoint's token, so the two editors meet as conflicts. P3(a): a pin rides every later sheet from its start, but reconcile_pins fills shelves only from its shelf start. The table's pin sets both. The cancel prune and the cold open's carried count treat the shelf start as where a card originated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>Items: Insert into sheet (a run under Generated, a rule under Rules, a wiki article under Wiki: P10a), one per source per sheet, Remove with an undo; Keep for later (P11a) and moving it onto a sheet. The item routes live at /api/prep-items/{id}, For later at /api/campaigns/{id}/prep/later. Pins (D39, P3a): pinning an item makes one pin that rides every later sheet, and rides the shelves only if the item is already on this shelf. Add to shelf, from an item or a carried block, sets the pin's shelf start there and files the card (and the pin) in the scene. Unpin and Pin again reopen the same pin; the table's Unpin tail is now shelf_service.end_pin, shared. The plan (D38): POST .../prep/plan queues session_prep with the sheet's want as its direction and names the run on the sheet. The worker (run_workbench_generation_core, on task_session) writes the plan into the sheet if the sheet still names that run, dated by when the tool began, so a change made while drafting leaves it stale. Use this draft, and each scene, secret or NPC onto the shelf as a note or wiki card. The plan and items never move the sheet's autosave version. No migration. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>- GET /campaigns/{id}/planning: the sessions ahead and what their sheets hold, every pin and what it rides, the scene library, the arcs, the open quests and For later, in one read that writes nothing. - P8(a): POST /campaigns/{id}/pins/{pin}/unpin stops a pin at the last session played or being played (or where it was pinned, if that is later) and names the session; /pin-again is its Undo. - Arcs: a soft delete with POST .../restore, and PUT .../arcs/order. - scenes.session_id, the session a scene was made for. - prep_session on the campaign list, and This week's prep line gains beats, plan_drafted and has_sheet, both from the rule Planning uses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>The owner's answer to P12: the old pinned runs that P4's migration left pinned, the ones that failed or never finished, stay ordinary unkept runs and clear 30 days after they were made, like any other. With nothing left to read or write it, the column goes. - Migration d6f8b0c2e4a7, after a7b9c1d3e5f6, drops the column; its downgrade re-adds it as NOT NULL DEFAULT false, and f6a8b0c2d4e5's own downgrade then re-pins what a live item keeps. The one-head pin moves to test_drop_generation_pinned_migration; test_planning_migration's becomes still-in-the-chain; test_notifications' history names it. - The sweep's exemption goes from kept_clause, so the failed runs clear. - Removed with it: the model column, set_pinned, the list's pinned filter, POST .../workbench/history/{id}/pin and /unpin (the History panel that called them is gone; nothing in the frontend did), the pinned field on History's rows, the demo seed's pinned=False, and the frontend's unused pinResult/unpinResult. - Tests: the retired routes are 404s, a failed run clears 30 days after it was made, the sweep takes an old failed run, and the migration's up, down, up. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>B2 made the admin Test Email send inline and answer 200 {sent, error} instead of queueing (202). The seed still expected the 202 and failed the journeys job before any test ran. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>