Repository navigation
Conversation
Add runbook-steps.ts: a pure compiler that turns pack requirements, action_items (or the linked SOP) into 1-of-N steps anchored to the video timeline using only pack evidence - extractor-reported ranges, grounded-spec citations, transcript segments quoting named tool evidence or sharing distinctive vocabulary, chapters, and visual events. Steps without evidence keep timestamp_range null. Includes Step 0 prerequisites from stack.tools / stack checks, verification from grounded acceptance criteria or tool checks, RUNBOOK.md rendering, and time/hash lookups. Requirements and action_items gain optional start_s/end_s (no schema version bump). Fixture is the live pBsT6v-ciO8 pack slice. Co-authored-by: KK <kk-agent@users.noreply.github.com>
Ask Gemini for optional start_s/end_s on requirements and action_items (omit when not observed, never guess) and keep only finite, ordered, non-negative ranges in the parser. Pass bounded code_snippets through verifyIdentityPack so the browser pack can show code steps. No stored-pack schema version bump: existing packs keep working and derive anchors client-side. Co-authored-by: KK <kk-agent@users.noreply.github.com>
seekTo(seconds, { autoplay: false }) seeks and explicitly pauses so the
Step Runner can honor an 'Autoplay step clip' toggle. Default behavior
(seek + play) is unchanged; covered by a jsdom hook test with a stubbed
IFrame API.
Co-authored-by: KK <kk-agent@users.noreply.github.com>
Accept a bounded, zod-validated step context on POST /api/chat. When present (and only with a pack binding), the system prompt becomes identity + the active step + the transcript/visual evidence inside a 15s-padded window around the step's anchored range; whole-pack SOP and action lists stay out so one step's troubleshooting does not drag the full pack back into context. Steps without a verified timestamp fall back to the whole transcript and say so. Malformed step contexts fail closed (400) before any model call. Co-authored-by: KK <kk-agent@users.noreply.github.com>
StepRunner: 'Step n of N' stepper with Previous/Next/quick-jump, Step 0 prerequisites checklist, per-step card (action type, anchored time range with provenance, keyframe, quote, command/snippet with copy, inputs/ outputs, verification + local completion mark, troubleshoot hook). Selecting a step scrolls to top, writes #step-n, seeks the player to the anchored start (cue-only when 'Autoplay step clip' is off, pauses at the clip end when on), and reports the active step for chat re-grounding. Unanchored steps disable seek and say why. StudioRunbookPane switches between the runner and a copy/download RUNBOOK.md reference view. Co-authored-by: KK <kk-agent@users.noreply.github.com>
Wire the Step Runner into OneLoopStudio: compile the runbook from the selected pack (+ linked SOP), hand the runner a player slice only when the loaded video is the pack video, persist checked prerequisites and completed steps on the Video row, and re-ground the chat composer to the active step (chip + 'step' body field, clearable; Troubleshoot focuses the composer). StudioIdeOutput gains a first 'Runbook' tab that opens by default when a runbook exists; the seven extraction tabs are unchanged. Export ships the rendered RUNBOOK.md. A pack switch drops a stale #step-N hash while /studio#step-N deep links still restore the step. Co-authored-by: KK <kk-agent@users.noreply.github.com>
…seek Keep 'Step n of N' on one line at the default 340px Deliverables width (select on its own row, autoplay + progress on one row) and distinguish 'player still loading/failed' from 'player shows a different video' when seeking is disabled. Co-authored-by: KK <kk-agent@users.noreply.github.com>
Co-authored-by: KK <kk-agent@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🔍 PR Validation |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Please add a See governance: #898 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7ffcb382c9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
groupthinking
left a comment
There was a problem hiding this comment.
Review at head 7ffcb382: nine inline findings remain unresolved. Most critically, the chat route accepts client-supplied step content as pack-grounded system context without resolving it against the hosted pack. The Step Runner also retains prior-step history, fails to re-arm clip stopping on replay, and has fixture, verification, range, ID-length, and deep-link defects documented inline. Please fix each current finding with focused regression coverage and rerun the full required checks. GitHub also reports this head as not mergeable.
✅ E2E Test Results: ALL TESTS PASSED
Test Output |
✅ E2E Test Results: ALL TESTS PASSED
Test Output |
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Files
|
✅ E2E Test Results: ALL TESTS PASSED
Test Output |
groupthinking
left a comment
There was a problem hiding this comment.
The ten reported review threads are resolved at this head. I checked the saved-pack step resolution, step-scoped chat history, clip replay, bounded IDs, optional ranges, initial step hash, canonical fixture, grounded verification, and linked-SOP fallback against the current code and regression tests. The full web suite, lint, type check, build, Vercel, and issue-link check pass. I approve this code change. The required dependency-review evidence workflow still fails; the live gateway and YouTube walkthrough were not repeated on this head, and integration with #2436 still needs checking before merge. This is not a merge or production-readiness recommendation.
✅ E2E Test Results: ALL TESTS PASSED
Test Output |
✅ E2E Test Results: ALL TESTS PASSED
Test Output |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Closes #2489. Related to #2331.
Current main integration — 2026-11-02
Head
6abe5ef38ee0bfe2ac7634ce93d963b151f73866adds the stale-response correction to merge3675ddc5cb0c7098cd7350cde72c0193de051580, which retains mainffd07a012ddae375096d0ac0f7d20faa680464feand the existing Step Runner branch. The original runbook compiler, player synchronization, export, saved-pack step validation, feature flags, and billing/quota paths remain. Current main's whole-pack planning interview keeps its multiline composer and structured follow-up answers.The merge also repairs a cross-feature bug: a valid step-scoped chat request containing “plan a build” or
planIntent: truepreviously entered the whole-pack planner after its step had been validated. Valid step context now takes precedence, so those requests keep the server-resolved step evidence window. The planning shortcut is available in whole-pack mode. Switching video, pack, or step clears interview state/history. A monotonically changing request generation invalidates prior completion handlers on each conversation reset, cleanup and new send. Leaving a whole-pack conversation and returning to that same pack cannot restore its old interview or error, and an old request'sfinallycannot clear a newer request's sending state. Step Runner focus still targets the textarea.Local validation on Node 24.20.0 with npm 10.8.0:
npx --yes npm@10.8.0 ci --ignore-scriptsandnpx --yes npm@10.8.0 run postinstall --workspace apps/webpassed for the merged dependency tree. The two-file generation correction reuses that exact install; manifests and lockfile are unchanged.node node_modules/vitest/vitest.mjs run --maxWorkers=2 src/components/__tests__/StudioIdeChat.plan.test.tsx src/app/api/__tests__/chat-pack-grounding-route.test.ts src/app/api/__tests__/chat-video-pack-plan-route.test.ts(fromapps/web) passed 19/19. Two additional React regressions first failed on the merged candidate, then passed after the generation correction: late success and late error after whole-pack → step → whole-pack, while a newer request remains pending. They verify discarded old content, retained new-request sending state and successful delivery of the current reply. The original independent round-trip reproduction also passes. Coverage retains interview reset, textarea focus, step-only request payloads, planning keywords/intent and existing whole-pack planning.npm --workspace=apps/web test -- --maxWorkers=2passed 1,594 tests across 180 files, with 28 skipped.npm --workspace=apps/web run type-checkandnpm --workspace=apps/web run lintpassed.NEXT_TELEMETRY_DISABLED=1 npm run build:webpassed, generating 53/53 static pages.git diff --checkpassed.The current PR diff retains the original 28 paths and adds regression coverage in the existing main file
StudioIdeChat.plan.test.tsx. The root lock keeps the prior branch's Vitest patch update while retaining main's dependency changes; no additional dependency update was made during this integration.Hosted checks, dependency-review evidence, reviewer decision and preview validation have not yet run for this new head. Older live walkthroughs do not validate this new head. No live model request, production deployment, approval or merge is included in this repair.
Step Runner behavior retained
The Deliverables pane stops being a static reference and becomes a 1-of-N Step Runner modeled on the Pollen Robotics assembly guide: every step is anchored to the video timeline from pack evidence,
Nextseeks the player, a Step 0 prerequisites checklist precedes Step 1, a Full Runbook Markdown mode exportsRUNBOOK.md, and the chat is re-grounded to the active step's transcript window.Intent-vs-execution audit (see
apps/web/src/lib/step-runner-PLAN.md§0): extraction already produced time-anchored evidence (segments, chapters, visuals, keyframes, grounded-spec citations), but Studio presented it as text and nothing in the pane drove the player. This PR closes that gap at the presentation layer without inventing evidence.Scope
lib/runbook-steps.ts— pure compiler: requirements / action_items (or linked SOP) → steps withid,step_number,title,kind,timestamp_range | null,anchorprovenance,content_markdown,verification(+ source), inputs/outputs, snippet, keyframe. Anchors only from: extractorstart_s/end_s, validated grounded-spec citations, transcript segments quoting namedstack.toolsevidence or sharing distinctive vocabulary, chapters, visual events. Step 0 prerequisites fromstack.tools/ stack checks / explicit access & runtime mentions.RUNBOOK.mdrenderer.components/studio/StepRunner.tsx,StudioRunbookPane.tsx— stepper (Prev/Next/quick-jump,#step-nhash, scroll-to-top), Autoplay-step-clip toggle (cue-only seek when off, pause at clip end when on), "Playing: Step k" follow chip, per-step card, local completion notes, Troubleshoot hook, markdown copy/download.StudioIdeOutput— new first Runbook tab, default when a runbook exists; the seven extraction tabs are unchanged.StudioIdeChat+api/chat/route.ts+chat-pack-grounding.ts— bounded, zod-validatedstepbody field → identity + active step + transcript/visual evidence inside a 15s-padded window (whole-pack SOP/action lists omitted). Fails closed on malformed step or missing pack binding.use-youtube-player.ts—seekTo(seconds, { autoplay })(default unchanged).start_s/end_son requirements and action_items ("omit when not observed — never guess"); client citation now carries boundedcode_snippets. NoVIDEO_PACK_STRUCTURE_SCHEMA_VERSIONbump (would force a paid re-extract of every stored pack); stored packs derive anchors client-side.Video.runbookProgress(local notes),RUNBOOK.mdin Export.Remaining limits
Anchors come only from saved extractor or transcript evidence. Unanchored steps say “No verified timestamp” and do not seek. Coarse chapter or vocabulary anchors may select a wider segment; users can inspect provenance before relying on the seek target. Step chat validates pack binding and resolves step details from the saved pack on the server. Linked-SOP fallback steps use the same compiler in Studio and server chat. The existing Studio feature flag and quota/billing behavior are preserved. No structure-schema bump or paid re-extraction is introduced.
Hosted checks, fresh dependency artifacts and preview validation remain pending for this exact head. Revert through a reviewed PR preserving unrelated current-main changes; stored packs remain compatible.
Main advanced independently to
1b826c1a71e1e341a916c2df6bd7a0391b6171c0after this candidate was tested, removing an unused Python deployment wrapper. An actual Git merge-tree check is conflict-free, preserves both cleanup changes, and leaves this PR’s changed-file set unchanged. The source and local test receipts remain bound to the exact candidate above; no new application test run is claimed for that separate Python cleanup.