280 lines
7.5 KiB
Markdown
280 lines
7.5 KiB
Markdown
# Scene Skill 102 Mock Runtime Harness Implementation Plan
|
|
|
|
> Date: 2026-04-20
|
|
> Status: Draft
|
|
> Upstream Design: `docs/superpowers/specs/2026-04-20-scene-skill-102-mock-runtime-harness-implementation-design.md`
|
|
> Input Matrix: `tests/fixtures/generated_scene/scene_skill_102_mock_runtime_validation_matrix_2026-04-20.json`
|
|
|
|
## Plan Intent
|
|
|
|
Implement and execute bounded mock runtime harnesses for representative generated scene skills.
|
|
|
|
This plan validates generated script control flow under fake dependencies. It does not validate production access, real data correctness, or browser-integrated host behavior.
|
|
|
|
## Fixed Inputs
|
|
|
|
1. `examples/scene_skill_102_final_materialization_2026-04-19/skills`
|
|
2. `tests/fixtures/generated_scene/scene_skill_102_static_validation_2026-04-20.json`
|
|
3. `tests/fixtures/generated_scene/scene_skill_102_dispatch_dry_run_validation_2026-04-20.json`
|
|
4. `tests/fixtures/generated_scene/scene_skill_102_mock_runtime_validation_matrix_2026-04-20.json`
|
|
5. `tests/fixtures/generated_scene/scene_skill_102_pseudoprod_readiness_2026-04-20.json`
|
|
|
|
## Planned Outputs
|
|
|
|
1. `tests/fixtures/generated_scene/scene_skill_102_mock_runtime_harness_results_2026-04-20.json`
|
|
2. `docs/superpowers/reports/2026-04-20-scene-skill-102-mock-runtime-harness-report.md`
|
|
|
|
## Allowed Files
|
|
|
|
1. new mock harness files under `tests/` or `tests/fixtures/generated_scene/`
|
|
2. `tests/fixtures/generated_scene/scene_skill_102_mock_runtime_harness_results_2026-04-20.json`
|
|
3. `docs/superpowers/reports/2026-04-20-scene-skill-102-mock-runtime-harness-report.md`
|
|
|
|
## Forbidden Files
|
|
|
|
1. `src/generated_scene/analyzer.rs`
|
|
2. `src/generated_scene/generator.rs`
|
|
3. `src/generated_scene/ir.rs`
|
|
4. `examples/scene_skill_102_final_materialization_2026-04-19/skills/**`
|
|
5. `tests/fixtures/generated_scene/scene_execution_board_2026-04-18.json`
|
|
|
|
## Workstreams
|
|
|
|
1. `WS1` Mock harness foundation
|
|
2. `WS2` Mainline fetch archetype harnesses
|
|
3. `WS3` Small bucket harnesses
|
|
4. `WS4` Boundary/runtime harnesses
|
|
5. `WS5` Integrated result reporting
|
|
|
|
## Phase 0: Freeze Mock Runtime Boundary
|
|
|
|
### Objective
|
|
|
|
Freeze mock validation as a non-production, non-browser, non-network stage.
|
|
|
|
### Tasks
|
|
|
|
1. Confirm static validation is `102 / 102`.
|
|
2. Confirm deterministic dispatch dry-run is `102 / 102`.
|
|
3. Confirm this plan does not mutate generated skill packages.
|
|
4. Confirm this plan does not require production credentials or network access.
|
|
|
|
### Deliverables
|
|
|
|
1. baseline section in final mock runtime harness report
|
|
|
|
### Acceptance Criteria
|
|
|
|
1. no production environment is accessed
|
|
2. no generated skill is modified
|
|
3. no official board status is changed
|
|
|
|
## Phase 1: Mock Harness Foundation
|
|
|
|
### Objective
|
|
|
|
Create the shared fake runtime primitives used by all representative harnesses.
|
|
|
|
### Tasks
|
|
|
|
1. define fake `fetch`
|
|
2. define fake browser DOM surface
|
|
3. define fake artifact writer
|
|
4. define fake host bridge callback surface
|
|
5. define fake local-doc service surface
|
|
6. define common result schema:
|
|
- `script-load-pass`
|
|
- `mock-runtime-pass`
|
|
- `mock-runtime-partial`
|
|
- `mock-runtime-fail`
|
|
|
|
### Deliverables
|
|
|
|
1. shared mock harness implementation
|
|
|
|
### Acceptance Criteria
|
|
|
|
1. harness foundation does not call real network
|
|
2. harness foundation can run without browser or credentials
|
|
3. harness foundation can load a generated script from the final materialization root
|
|
|
|
## Phase 2: Route 1 - Paginated Enrichment Harness
|
|
|
|
### Objective
|
|
|
|
Validate the largest archetype bucket first.
|
|
|
|
### Fixed Representatives
|
|
|
|
1. `sweep-001-scene`
|
|
2. `sweep-002-scene`
|
|
3. `sweep-003-scene`
|
|
|
|
### Tasks
|
|
|
|
1. load each representative script
|
|
2. provide fake primary page response
|
|
3. provide fake enrichment response
|
|
4. verify expected request order where observable
|
|
5. verify artifact metadata or structured result is produced
|
|
|
|
### Deliverables
|
|
|
|
1. paginated enrichment mock result records
|
|
|
|
### Acceptance Criteria
|
|
|
|
1. each representative receives a `mock-runtime-*` status
|
|
2. no real request is sent
|
|
3. failures include named failure reason
|
|
|
|
## Phase 3: Route 2 - G2 And G1-E Fetch Harnesses
|
|
|
|
### Objective
|
|
|
|
Validate fetch-based mainline small buckets.
|
|
|
|
### Fixed Representatives
|
|
|
|
`multi_mode_request`:
|
|
|
|
1. `sweep-020-scene`
|
|
2. `sweep-023-scene`
|
|
3. `sweep-030-scene`
|
|
|
|
`single_request_enrichment`:
|
|
|
|
1. `sweep-013-scene`
|
|
2. `sweep-016-scene`
|
|
3. `sweep-068-scene`
|
|
|
|
### Tasks
|
|
|
|
1. run representative scripts with fake fetch
|
|
2. verify mode/request paths for multi-mode scenes
|
|
3. verify enrichment path for single-request enrichment scenes
|
|
4. record pass/fail reason
|
|
|
|
### Deliverables
|
|
|
|
1. multi-mode request mock result records
|
|
2. single-request enrichment mock result records
|
|
|
|
### Acceptance Criteria
|
|
|
|
1. each representative receives a `mock-runtime-*` status
|
|
2. real-sample or production execution is not started
|
|
|
|
## Phase 4: Route 3 - Inventory And Page-State Harnesses
|
|
|
|
### Objective
|
|
|
|
Validate the small specialized buckets.
|
|
|
|
### Fixed Representatives
|
|
|
|
`multi_endpoint_inventory`:
|
|
|
|
1. `sweep-084-scene`
|
|
2. `sweep-085-scene`
|
|
|
|
`page_state_eval`:
|
|
|
|
1. `sweep-066-scene`
|
|
2. `sweep-094-scene`
|
|
|
|
### Tasks
|
|
|
|
1. run multi-endpoint representatives with fake endpoint responses
|
|
2. run page-state representatives with fake DOM state
|
|
3. record pass/fail reason
|
|
|
|
### Deliverables
|
|
|
|
1. inventory mock result records
|
|
2. page-state mock result records
|
|
|
|
### Acceptance Criteria
|
|
|
|
1. each representative receives a `mock-runtime-*` status
|
|
2. no host browser is required
|
|
|
|
## Phase 5: Route 4 - Local-Doc And Host-Bridge Harnesses
|
|
|
|
### Objective
|
|
|
|
Validate boundary runtime families with fake local-doc and fake host-bridge surfaces.
|
|
|
|
### Fixed Representatives
|
|
|
|
`local_doc_pipeline`:
|
|
|
|
1. `sweep-012-scene`
|
|
2. `sweep-017-scene`
|
|
3. `sweep-019-scene`
|
|
|
|
`host_bridge_workflow`:
|
|
|
|
1. `sweep-007-scene`
|
|
2. `sweep-009-scene`
|
|
3. `sweep-010-scene`
|
|
|
|
### Tasks
|
|
|
|
1. run local-doc representatives with fake local document query and export responses
|
|
2. run host-bridge representatives with fake action and callback completion responses
|
|
3. classify boundary failures as mock harness gaps or script contract gaps
|
|
|
|
### Deliverables
|
|
|
|
1. local-doc mock result records
|
|
2. host-bridge mock result records
|
|
|
|
### Acceptance Criteria
|
|
|
|
1. no real host bridge is invoked
|
|
2. no local document service is invoked
|
|
3. failures are explicitly categorized
|
|
|
|
## Phase 6: Integrated Mock Runtime Report
|
|
|
|
### Objective
|
|
|
|
Publish representative execution results and propagated matrix interpretation.
|
|
|
|
### Tasks
|
|
|
|
1. write `scene_skill_102_mock_runtime_harness_results_2026-04-20.json`
|
|
2. summarize representative pass/fail by archetype
|
|
3. summarize which non-representative scenes are covered only by representative inference
|
|
4. identify which archetypes still require direct mock expansion
|
|
5. recommend whether to proceed to pseudo-production batch planning
|
|
|
|
### Deliverables
|
|
|
|
1. `tests/fixtures/generated_scene/scene_skill_102_mock_runtime_harness_results_2026-04-20.json`
|
|
2. `docs/superpowers/reports/2026-04-20-scene-skill-102-mock-runtime-harness-report.md`
|
|
|
|
### Acceptance Criteria
|
|
|
|
1. report distinguishes representative execution from propagated coverage
|
|
2. report does not claim production execution
|
|
3. report does not update official board
|
|
|
|
## Completion Criteria
|
|
|
|
This plan is complete when:
|
|
|
|
1. every fixed representative has a mock runtime result record
|
|
2. integrated mock runtime results JSON is published
|
|
3. mock runtime report is published
|
|
4. generated skill packages remain unchanged
|
|
5. no real browser or production environment was used
|
|
|
|
## Stop Statement
|
|
|
|
Stop after publishing mock runtime harness results and report.
|
|
|
|
Do not start pseudo-production or real-environment validation under this plan.
|
|
|