Skip to content

Build the Podcast end-to-end slice #9

Closed

Description

@alexeygrigorev

Build the Podcast end-to-end slice

Status: pending
Tags: enhancement, portal, work-engine, assistant, podcast, process-docs, frontend, backend, data, testing, P0
Depends on: #4, #6 (closed), #7, #8, #49 (closed), #50 (closed)
Blocks: first V1 workflow acceptance, later end-to-end workflow slices, backend consolidation after the first workflow proves the model

Scope

Build the first V1 operator flow for one Podcast workflow run. Keep this as an integration slice across the existing work-engine, process-doc, and Podcast Assistant surfaces; do not redesign the workflow engine, assistant job system, or artifact storage model in this issue.

The operator should be able to:

  • Start a Podcast workflow from the groomed Podcast workflow/template produced by Define the Podcast workflow #8.
  • Provide the minimal launch inputs needed for V1: topic or working title, guest/speaker name, anchor date/live stream date, and optional guest email or source note.
  • Open the resulting Podcast workflow from the dashboard, bundle/workflow list, or task row.
  • See the Podcast workflow in context: title, stage, anchor date, progress, next due tasks, overdue tasks, waiting/follow-up tasks, required bundle links, attached files/assistant outputs, and process references.
  • Execute Podcast tasks from the workflow detail without leaving the workflow context.
  • Use process docs in context for Podcast tasks, preferring instructionDocId/registry resolution from Add task-to-process-doc links #6 and falling back to instructionsUrl only when no stable doc ID exists.
  • Mark tasks as waiting with waitingFor, followUpAt, and a short note; due follow-ups must surface through the existing reminder behavior from Generate dashboard reminders from waiting follow-up dates #50.
  • Complete tasks only when required proof exists:
    • required-link tasks need their URL saved on the task and reflected in the matching Podcast bundle link;
    • required-file tasks need an uploaded file record;
    • completion records completedAt and, where actor context is available, completedBy.
  • Attach or link a Podcast Assistant output from Import Podcast Assistant into assistants/podcast #7 to the workflow as the V1 artifact/proof for the podcast document task, using the current file metadata and/or bundle-link model unless a finalized artifact API already exists by implementation time.

Use the V1 runtime shape from docs/v1-runtime-architecture.md: work execution goes through the private work-engine behind the authenticated /work/api/* broker; Git-backed process knowledge stays under content/; private or bulky outputs are represented by metadata/links rather than moved into Git.

Acceptance Criteria

  • A Podcast workflow can be started from the Podcast template/workflow definition delivered by Define the Podcast workflow #8 using topic/title, guest name, anchor date, and optional guest email/source note.
  • Starting the workflow creates one active Podcast bundle/workflow with the expected title, podcast tag/type, stage, anchor date, required bundle-link slots, process references, and generated task set.
  • The generated tasks preserve task definition metadata from Define the Podcast workflow #8, including offsets, milestones/stage transitions, assignees when present, required links/files, instructionDocId or instructionsUrl, phase/systems/validation fields where available, and template task refs.
  • The operator can open the Podcast workflow from the dashboard/task list and from the workflow/bundle list.
  • The Podcast workflow detail shows active tasks before completed tasks, progress, stage, due/overdue state, waiting/follow-up state, required bundle links, process references, and attached proof/output records relevant to the workflow.
  • Completing a task with requiredLinkName is blocked until a URL is saved; saving the URL updates both the task proof link and the matching Podcast bundle link.
  • Completing a task with requiresFile is blocked until at least one file is attached to that task.
  • Completing a milestone task updates the Podcast workflow stage according to the workflow definition from Define the Podcast workflow #8.
  • A Podcast task can be moved to waiting only with waitingFor, followUpAt, and a note/comment; when followUpAt is due, the follow-up appears on Operations Home/reminders without hiding the underlying workflow risk.
  • Follow-up actions let the operator either move the task back to todo when a response arrives or record that a follow-up was sent and set the next followUpAt.
  • Tasks with instructionDocId show resolved process-doc context and an action to open the doc in the portal; unresolved doc IDs show a usable fallback state; legacy instructionsUrl still appears when no doc ID exists.
  • A Podcast Assistant output from Import Podcast Assistant into assistants/podcast #7 can be attached or linked to the relevant Podcast task/workflow, is visible in the workflow context, and can satisfy the podcast-document proof path for V1.
  • The flow works through the authenticated V1 /work / /work/api/* surface and does not introduce a second public work-engine endpoint.
  • Automated coverage includes backend/API tests for workflow start, generated task metadata, proof blocking, waiting/follow-up fields, stage transitions, and assistant-output attachment/linking.
  • Playwright coverage exercises the operator path: start Podcast workflow, open it, view a process doc action, save required proof, attach/link assistant output, mark a task waiting, resolve a follow-up, and complete proof-gated tasks.

Test Scenarios

Scenario: Operator starts a Podcast workflow

Given: the Podcast workflow/template from #8 exists
When: the operator starts a Podcast workflow with a live stream date, guest name, and topic
Then: an active Podcast workflow is created with generated tasks, required bundle-link slots, stage, references, and a visible path back to the workflow detail.

Scenario: Operator uses process docs while executing a task

Given: a Podcast task has a resolvable instructionDocId
When: the operator opens the task inside the Podcast workflow
Then: the UI shows the process doc title/context and an action to open it in the portal.

Scenario: Required link blocks task completion

Given: the Podcast task Create an event in Luma requires the Luma link
When: the operator tries to complete it without a URL
Then: completion is blocked with a clear reason.
When: the operator saves the Luma URL
Then: the task can be completed and the Podcast workflow's Luma bundle link contains the same URL.

Scenario: Required file blocks task completion

Given: a Podcast task requires a file, such as the banner/proof task from the workflow definition
When: the operator tries to complete it before attaching a file
Then: completion is blocked.
When: the operator uploads or attaches a file record to that task
Then: the task can be completed.

Scenario: Waiting guest follow-up resurfaces

Given: a Podcast task is waiting for a guest with waitingFor, followUpAt, and a note
When: followUpAt is today or earlier
Then: the task appears as a due follow-up on Operations Home/reminders and still links back to the Podcast workflow.
When: the operator records Response received
Then: the task moves back to todo with an event note.
When: the operator records Follow-up sent with a new date
Then: the task remains waiting with the new followUpAt.

Scenario: Assistant output becomes workflow proof

Given: Podcast Assistant has produced a draft podcast guest/prep document from #7
When: the operator attaches or links that output to the Podcast workflow/task
Then: the output is visible in the workflow context and the podcast-document task has the proof needed for V1 completion.

Scenario: Podcast milestone advances stage

Given: a Podcast milestone task has stageOnComplete
When: the operator completes that milestone with required proof present
Then: the Podcast workflow stage updates and the active/completed task ordering remains stable.

Out of Scope

  • Rebuilding the whole portal navigation or design system.
  • Creating a generic workflow designer beyond what Define the Podcast workflow #8 defines for Podcast.
  • Redefining the task/bundle/template data model beyond fields needed to consume Define the Podcast workflow #8.
  • Importing or normalizing every Podcast SOP/template; Define the Podcast workflow #8 owns the workflow definition and priority mappings.
  • Building the full assistant job lifecycle from Implement assistant job model and lifecycle #30.
  • Building the final artifact model/storage policy from Define artifact model and storage policy #29.
  • Adding S3-backed binary artifact storage unless it already exists by implementation time.
  • Automating external systems such as Luma, Meetup, YouTube, Spotify, Airtable, Google Drive, Slack, Mailchimp, or Dropbox.
  • Migrating Trello cards, spreadsheet rows, or historical Podcast runs.
  • Consolidating work-engine into the Python backend.

Dependencies

Required before implementation starts:

Already satisfied or available as platform prerequisites:

Not blocking unless they land first:

Activity

  1. added
    needs groomingRaw intake that needs PM grooming
    portalShared portal shell and UX
    assistantAssistant modules and jobs
    podcastPodcast workflow and assistant
    P0Must have
    enhancementNew or improved functionality
    work-engineDataTasks task execution engine
    process-docsSOPs, templates, references, playbooks
    dataData model, migration, storage
    and removed
    needs groomingRaw intake that needs PM grooming
    on Jun 27, 2026
  2. alexeygrigorev commented on Jun 28, 2026

    @alexeygrigorev
    MemberAuthor

    SWE handoff for #9

    Implemented the Podcast end-to-end operator slice across work-engine UI, assistant-job/artifact proof integration, and coverage.

    Changed files

    • work-engine/src/public/app.js
    • work-engine/src/pages/index.html
    • work-engine/src/routes/assistantJobs.ts
    • work-engine/tests/api-podcast-slice.test.ts
    • work-engine/e2e/podcast-operator-slice.spec.js

    What changed

    • Added a Podcast workflow launcher on the bundle/workflow page with topic/title, guest, live-stream date, optional guest email, and source note. It starts the canonical 42-task Podcast template and seeds the guest-email proof link when supplied.
    • Expanded workflow detail with workflow context, process-doc context, proof/artifact visibility, required file attachment controls, waiting/follow-up controls, and assistant-output actions while staying inside the bundle/workflow workspace.
    • Approved Podcast assistant outputs now approve the output artifact, mirror it to the linked task/workflow, fill the podcast-document proof link, and update the matching bundle-link slot so the proof-gated task can complete through the Define artifact model and storage policy #29/Implement assistant job model and lifecycle #30 contract.
    • Kept the existing /work / /work/api/* runtime boundary; no new public work-engine endpoint was introduced.

    Verification

    • git diff --check — passed
    • npm --prefix work-engine test — passed, 646 tests
    • npm --prefix work-engine run typecheck — passed
    • npm --prefix work-engine run build — passed
    • npm --prefix work-engine run test:e2e — passed, 292 tests
    • uv run --project lambda-functions --extra search --with pytest python -m pytest tests/docs_app — passed, 75 passed / 1 skipped

    Assistant tests skipped: no files under assistants/podcast/** changed.

    Screenshots

    • .tmp/screenshots/podcast-start-qj3061.png
    • .tmp/screenshots/podcast-detail-qj3061.png
    • .tmp/screenshots/podcast-dashboard-open-qj3061.png
    • .tmp/screenshots/podcast-proof-link-qj3061.png
    • .tmp/screenshots/podcast-proof-file-qj3061.png
    • .tmp/screenshots/podcast-assistant-output-qj3061.png
    • .tmp/screenshots/podcast-waiting-qj3061.png
    • .tmp/screenshots/podcast-stage-after-event-qj3061.png

    Acceptance criteria

    No commit, push, close, or PR was performed.

  3. alexeygrigorev commented on Jun 28, 2026

    @alexeygrigorev
    MemberAuthor

    TEST: CHANGES REQUESTED

    Tester role review for #9. I read AGENTS.md, _docs/PROCESS.md, the issue body, and the SWE handoff, then inspected the uncommitted diff and changed files.

    Diff reviewed

    Tracked changes:

    • work-engine/src/pages/index.html
    • work-engine/src/public/app.js
    • work-engine/src/routes/assistantJobs.ts

    Added test files:

    • work-engine/tests/api-podcast-slice.test.ts
    • work-engine/e2e/podcast-operator-slice.spec.js

    No assistants/podcast/** changes were present, so assistant-specific tests were skipped.

    Commands run

    • git diff --check — PASS, no output.
    • npm --prefix work-engine test — PASS, 646 tests passed.
    • npm --prefix work-engine run typecheck — PASS.
    • npm --prefix work-engine run build — PASS.
    • npm --prefix work-engine run test:e2e — FAIL, 291 passed / 1 failed.
      • Failed test: e2e/podcast-operator-slice.spec.js:18.
      • Failure: timeout waiting for [data-testid="workflow-context"] after clicking Start Podcast.
      • Error context: work-engine/test-results/podcast-operator-slice-Pod-2b458-ut-waiting-and-stage-change/error-context.md.
      • The page alert was Podcast template is not available. while the template dropdown already contained Podcast (42 tasks).
    • uv run --project lambda-functions --extra search --with pytest python -m pytest tests/docs_app — PASS, 75 passed / 1 skipped.

    Screenshot evidence inspected

    Handoff screenshots reviewed:

    • .tmp/screenshots/podcast-start-qj3061.png
    • .tmp/screenshots/podcast-detail-qj3061.png
    • .tmp/screenshots/podcast-dashboard-open-qj3061.png
    • .tmp/screenshots/podcast-proof-link-qj3061.png
    • .tmp/screenshots/podcast-proof-file-qj3061.png
    • .tmp/screenshots/podcast-assistant-output-qj3061.png
    • .tmp/screenshots/podcast-waiting-qj3061.png
    • .tmp/screenshots/podcast-stage-after-event-qj3061.png

    Additional failed-run screenshot created by the required e2e command:

    • .tmp/screenshots/podcast-start-uwv13h.png

    I did not see a 404 in the reviewed screenshots, but the required e2e run failed before workflow detail opened. The screenshots also show the workflow detail using raw process-doc IDs rather than resolved doc titles/context.

    Acceptance coverage

    Covered by implementation/tests where the flow succeeds:

    • Podcast launch inputs exist: topic/title, guest, anchor date, optional guest email/source note.
    • API creation from the seeded Podcast template creates a 42-task active workflow with Podcast metadata, stage, anchor date, bundle link slots, references, and task metadata.
    • Generated tasks preserve offsets, template refs, stage transitions, assignees, required links/files, doc fields, phase/systems/validation, and proof fields.
    • Detail view shows stage, progress, active-before-done ordering, bundle links, assistant/proof output panel, required file controls, waiting/follow-up controls, and proof-gated checkboxes.
    • Required link completion is blocked until link proof exists; saving a required link updates task link and bundle link in the workflow detail path.
    • Required file completion is blocked until a file record exists.
    • Milestone completion updates workflow stage.
    • Assistant output approval mirrors an approved artifact to the task/workflow and can satisfy the Podcast document proof path.
    • The diff does not introduce a second public work-engine endpoint; the flow remains on existing /work / /work/api/* surfaces, and auth/broker tests passed.

    Changes requested

    1. Fix the Podcast launcher readiness race.

      The required Playwright run failed because Start Podcast was clickable before api.templates.list() finished setting podcastTemplate. In work-engine/src/public/app.js:2146-2170, the button starts enabled, podcastTemplate is null, and a fast operator click produces Podcast template is not available. This breaks the first step of the operator JTBD flow and failed the required test:e2e command.

    2. Enforce the waiting note/comment server-side and cover it in API tests.

      The issue requires waiting only with waitingFor, followUpAt, and a note/comment. The UI checks all three at work-engine/src/public/app.js:2990-3008, but the API only validates waitingFor and followUpAt at work-engine/src/router.ts:619-626. Existing API coverage still accepts a waiting update without comment at work-engine/tests/api-tasks.test.ts:585-599. This means non-UI callers can create incomplete waiting state, and backend coverage does not prove the acceptance criterion.

    3. Resolve process-doc context in the workflow detail, not just link raw IDs.

      work-engine/src/public/app.js:390-400 renders the raw instructionDocId as the visible process-doc link and does not use registry resolution to show the resolved title/path or an unresolved-doc fallback state. The docs app has registry/resolve behavior, but the work-engine detail surface under review does not show resolved context. From the operator JTBD lens, this keeps process knowledge feeling like a separate lookup instead of part of the workflow execution surface.

    JTBD/operator-flow verdict

    The slice is close, but not acceptable yet. The operator can hit a dead first click on Start Podcast, backend waiting state can be incomplete despite the UI, and process-doc context is still raw ID/link based. Those gaps prevent this from being one smooth daily jobs-to-be-done flow rather than a set of connected but fragile tools.

    No files were intentionally edited, committed, pushed, closed, or PR'd by Tester.

  4. alexeygrigorev commented on Jun 28, 2026

    @alexeygrigorev
    MemberAuthor

    SWE fix handoff for #9 changes requested

    Addressed the tester's CHANGES REQUESTED items for the current #9 work-engine implementation.

    Changed files

    • work-engine/src/public/app.js
    • work-engine/src/pages/index.html
    • work-engine/src/router.ts
    • work-engine/src/routes/assistantJobs.ts (pre-existing Build the Podcast end-to-end slice #9 implementation remains in the worktree)
    • work-engine/tests/api-tasks.test.ts
    • work-engine/tests/home-dashboard.test.ts
    • work-engine/tests/api-podcast-slice.test.ts
    • work-engine/e2e/podcast-operator-slice.spec.js

    Fixes

    • Reproduced the Podcast E2E area: the focused spec was timing-dependent and initially passed locally, then failed while I added assertions until the test reopen path was corrected. The full required E2E now passes.
    • Gated Start Podcast behind Podcast template readiness. The button now starts disabled/loading, only enables when the Podcast template is loaded, and the E2E test delays /api/templates to cover the race.
    • Added server-side waiting validation for create/update: waiting now requires waitingFor, followUpAt, and non-empty comment. Updated API tests and Build the Podcast end-to-end slice #9 slice coverage for missing comment rejection.
    • Replaced raw visible instructionDocId display in workflow task detail with resolved Podcast process-doc titles, summaries, doc type/action links, and phase/step/system context. Unmapped doc IDs now show an unresolved fallback with a docs resolver action; legacy instructionsUrl fallback remains.
    • Preserved the operator flow around start, reminders/follow-up, risk/proof, assistant output attachment, and SOP context inside the workflow detail.

    Verification

    • git diff --check — PASS
    • npm --prefix work-engine test — PASS, 647 tests
    • npm --prefix work-engine run typecheck — PASS
    • npm --prefix work-engine run build — PASS
    • npm --prefix work-engine run test:e2e — PASS, 292 tests

    Focused checks also run while developing:

    • npm --prefix work-engine run test:e2e -- e2e/podcast-operator-slice.spec.js — PASS
    • npm --prefix work-engine test -- tests/api-tasks.test.ts tests/api-podcast-slice.test.ts — PASS via the work-engine test script, 647 tests

    Docs app pytest was not rerun because this fix did not touch docs or Lambda code.

    No commit, push, close, or PR was performed.

  5. alexeygrigorev commented on Jun 28, 2026

    @alexeygrigorev
    MemberAuthor

    TEST PASS

    Tester re-review for #9 after the CHANGES REQUESTED fix handoff. I read AGENTS.md, _docs/PROCESS.md, issue #9, the prior TEST CHANGES REQUESTED comment, and the SWE fix handoff. I did not edit files, commit, push, close the issue, or open a PR.

    Commands run

    • git diff --check — PASS, no output.
    • npm --prefix work-engine test — PASS, 647 tests / 132 suites / 0 failed / 0 skipped.
    • npm --prefix work-engine run typecheck — PASS.
    • npm --prefix work-engine run build — PASS.
    • npm --prefix work-engine run test:e2e — PASS, 292 passed.
    • uv run --project lambda-functions --extra search --with pytest python -m pytest tests/docs_app — PASS, 75 passed / 1 skipped.

    Assistant tests skipped: git diff --name-only -- assistants/podcast returned no changes.

    Prior-fix verification

    1. Start Podcast readiness race — PASS. The button now starts disabled as Loading Podcast..., enables only after the Podcast template is loaded, and the Build the Podcast end-to-end slice #9 Playwright spec delays /api/templates while asserting this state before the first click. The full E2E run passed, including e2e/podcast-operator-slice.spec.js.
    2. Waiting validation — PASS. Server-side create/update validation now rejects waiting unless waitingFor, followUpAt, and non-empty comment are present. API coverage includes rejection for missing follow-up metadata and missing comment, plus Build the Podcast end-to-end slice #9 slice coverage for missing waiting note rejection.
    3. Process-doc context — PASS. Workflow detail resolves known instructionDocId values to doc title, summary, phase/context metadata, and an action such as Open SOP. The E2E also verifies an unresolved doc fallback with Try docs resolver; legacy instructionsUrl fallback remains in the renderer.
    4. Podcast operator flow/JTBD — PASS. The verified flow starts the Podcast workflow, opens it from dashboard and bundle list, shows risk/proof/reminder context, completes proof-gated link/file/artifact tasks, attaches/approves assistant output as proof, marks and resolves waiting follow-up work, and uses SOP context inside the workflow detail.

    Screenshot evidence inspected

    Latest passing E2E screenshots generated under .tmp/screenshots/:

    • .tmp/screenshots/podcast-start-zwf32s.png
    • .tmp/screenshots/podcast-detail-zwf32s.png
    • .tmp/screenshots/podcast-dashboard-open-zwf32s.png
    • .tmp/screenshots/podcast-proof-link-zwf32s.png
    • .tmp/screenshots/podcast-proof-file-zwf32s.png
    • .tmp/screenshots/podcast-assistant-output-zwf32s.png
    • .tmp/screenshots/podcast-waiting-zwf32s.png
    • .tmp/screenshots/podcast-stage-after-event-zwf32s.png

    I inspected the relevant screenshots and did not find a 404, missing state, broken layout, incoherent overlap, or disconnected UX. The long full-page captures show the sticky nav at the captured scroll position, which is a screenshot artifact rather than an in-viewport layout failure.

    Acceptance verdict

    TEST PASS. The full #9 acceptance criteria and the three prior failure areas are now covered by passing automated tests and screenshot-backed operator-flow evidence.

  6. alexeygrigorev commented on Jun 28, 2026

    @alexeygrigorev
    MemberAuthor

    PM ACCEPTED

    I reviewed #9 from the Product Manager acceptance role against docs/operations-manager-platform-jtbd.md, .goal-v1.md, the groomed issue scope, SWE handoffs, the prior TEST CHANGES REQUESTED comment, and the latest TEST PASS evidence at #9 (comment).

    Accepted from the operator perspective. The implemented slice now supports starting a Podcast workflow with the required minimal inputs and no dead first click; keeps the operator inside a single workflow context for next actions, risk, proof, waiting/follow-up state, SOP context, and assistant output; enforces proof-gated completion for links/files/artifacts; and surfaces waiting/follow-up actions in a way that supports reminders and response handling.

    The latest screenshot evidence shows the workflow behaving like a unified Podcast operating flow rather than a docs page plus disconnected tools. Tester already reran the full required commands and passed them. Issue #9 may proceed to commit.

    No files were edited, committed, pushed, closed, or PR opened by PM acceptance.

  7. alexeygrigorev commented on Jun 28, 2026

    @alexeygrigorev
    MemberAuthor

    ON-CALL PASS

    Post-push CI/CD monitoring for commit a68eeebdccf07344627f2ef2e6f640f4b3209b00 (Build Podcast operator workflow slice) completed successfully.

    GitHub Actions

    Jobs

    Issue #9 is CLOSED via the Closes #9 commit. No infra fix, code regression routing, PR, or destructive production operation was needed.

    [HUMAN] None identified from this CI/CD pass.

  8. added a commit that references this issue on Aug 14, 2026
    731b0f7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0Must haveassistantAssistant modules and jobsbackendBackend/APIdataData model, migration, storageenhancementNew or improved functionalityfrontendFrontend UIpodcastPodcast workflow and assistantportalShared portal shell and UXprocess-docsSOPs, templates, references, playbookstestingTests and QAwork-engineDataTasks task execution engine

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions