feat(M019/S01): git subtree import + workspace scaffolding #5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "kata/root/M019/S01"
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?
S01: Git subtree import + workspace scaffolding
Imports smelt's full git history into the assay repo at
smelt/viagit subtree add, updates workspace members to include bothcrates/*andsmelt/crates/*, and merges.cargo/config.tomlsettings from both projects.What ships
smelt/directory with full git history (2 crates: smelt-core, smelt-cli)Cargo.toml:members = ["crates/*", "smelt/crates/*"].cargo/config.toml: both[profile.dev]and[profile.test]withincremental = falseVerification
git log d03eab1^2 | head -5)smelt/Cargo.tomlunmodifiedKnown: CI will fail
just ready(pre-commit/pre-push/CI) fails because smelt'sworkspace = truedeps are not yet in the root[workspace.dependencies]. This is expected and intentional — dep alignment is S02 scope. CI failure here is not a regression.Linear
Closes WOL-188 (S01 — M019)
- MergeConflict { session, files } for squash merge conflict detection - MergeTargetExists { branch } for target branch collision - NoCompletedSessions for empty merge inputsmelt mergeCLI command with progress and summary output 5cfff5aadf- orchestrate_two_parallel_sessions: parallel execution + merge verification - orchestrate_sequential_dependency: A->B dependency chain - orchestrate_skip_dependents_on_failure: failed session skips dependents - orchestrate_abort_on_failure: abort policy stops entire orchestration - orchestrate_json_output: --json flag produces valid JSON with all fields - orchestrate_diamond_dependency: A->{B,C}->D DAG pattern - orchestrate_implicit_sequential: parallel_by_default=false runs in order- M002-CONTEXT.md: Real Assay Integration milestone context - Documents the critical Assay contract gap (AssayInvoker generates wrong manifest format — sessions vs session, spec as reference not description, missing assay init step) - Both bridging options documented; strategy decision deferred to planning - Open questions about test image strategy and ResultCollector compatibility - STATE.md: advance to M002 planning phase* docs(M003): context, requirements, and roadmap * "feat(M003/S01): GitHub Forge Client" * chore(M003/S01): auto-commit after reassess-roadmap * "feat(M003/S02): Manifest Forge Config + PR Creation" * chore(M003/S02): auto-commit after reassess-roadmap * "feat(M003/S03): PR Status Tracking" * chore(M003/S03): auto-commit after reassess-roadmap * feat(M003/S04): Infrastructure Hardening Per-job state isolation (.smelt/runs/<name>/state.toml) with backward-compat fallback to flat run-state.toml; smelt init generates a commented skeleton manifest; smelt list shows tabular view of past runs; .assay/ gitignore guard runs before provisioning; R006, R007, R008 validated. Tasks completed: - T01: migrate JobMonitor state path to per-job .smelt/runs/<name>/state.toml - T02: add smelt init command with commented skeleton manifest - T03: add smelt list command and .assay/ gitignore guard * "feat(M003/S05): smelt-core Library API" * "feat(M003/S06): Integration Proof" * feat(kata): complete M003 * docs(M004): context, requirements, and roadmap * "feat(M004/S01): Manifest Extension" * chore(M004/S01): auto-commit after reassess-roadmap * "feat(M004/S02): Compose File Generation" * chore(M004/S02): auto-commit after reassess-roadmap * "feat(M004/S03): ComposeProvider Lifecycle" * chore(M004/S03): auto-commit after reassess-roadmap * "feat(M004/S04): CLI Integration + Dry-Run" * feat(kata): complete M004 * docs(M005): context, requirements, and roadmap * "feat(M005/S01): Manifest Extension" * chore(M005/S01): auto-commit after reassess-roadmap * "feat(M005/S02): KubernetesProvider Lifecycle" * chore(M005/S02): auto-commit after reassess-roadmap * "feat(M005/S03): Push-from-Pod Result Collection" * chore(M005/S03): auto-commit after reassess-roadmap * "feat(M005/S04): CLI Integration + Dry-Run" * feat(kata): complete M005 * chore(kata): update STATE.md after M005 summary * docs(M006): context, requirements, and roadmap * chore(M006/S02): auto-commit after research-slice * chore(M006/S02): auto-commit after plan-slice * feat(S02/T01): core types, JobQueue, ServerState, and unit tests Create serve/ module with JobId, JobSource, JobStatus, QueuedJob, and ServerState implementing the full queue state machine (enqueue, try_dispatch, complete, cancel, retry_eligible). All 4 queue unit tests pass. Skeleton files for T02-T04 (dispatch, watcher, http_api) allow the module to compile. - Retrying status stays in-place in VecDeque (no re-enqueue) - try_dispatch() picks up both Queued and Retrying jobs - serde = { workspace = true } added to smelt-cli Cargo.toml * chore(M006/S02/T02): auto-commit after execute-task * feat(S02/T02): verify dispatch_loop, run_job_task, and CancellationToken broadcast — all tests pass * chore(M006/S02/T02): auto-commit after execute-task * feat(S02/T03): DirectoryWatcher with atomic file-move and integration tests * chore: update STATE.md — T03 done, T04 next * feat(S02/T04): HTTP API (axum) with 4 routes and 6 integration tests Implemented build_router() with POST/GET/GET-by-id/DELETE routes for job ingestion and state inspection. POST accepts raw TOML, parses and validates via JobManifest, writes to tempfile, and enqueues. GET routes return JobStateResponse JSON. DELETE cancels queued jobs (200) or returns 409 for running jobs. All 6 HTTP integration tests pass, plus all 14 serve::tests pass end-to-end. * chore: update STATE.md — S02 complete * feat(kata): complete S02 * fix(serve): rename queued_at_secs→queued_age_secs, fix dispatch test manifest schema, add .kata-cli/auto.lock to .gitignore* feat(S02/T01): SSE fan-out endpoints with lagged handling and CancellationToken shutdown - Add tokio-stream 0.1 (sync feature) and futures-util to workspace deps - Implement GET /api/v1/events (global SSE) and GET /api/v1/events?job=<id> (filtered SSE) - BroadcastStream wraps EventBus; filter_map handles lagged subscribers with synthetic event - CancellationToken passed through build_router() for clean SSE shutdown via take_until - KeepAlive pings active on all SSE connections - 4 new SSE tests: global receive, job filter, lagged subscriber, auth enforcement - reqwest stream feature added for test SSE chunk reading * feat(S02/T02): TUI event pane with vertical layout split - Split TUI render into two-panel vertical layout: job table (top, fill) + event pane (bottom, 12 rows) - Event pane shows last 20 events across all jobs sorted by recency (most recent first) - Each event line: [job_id] relative_age phase (extracted from payload) - Empty state: 'No events yet' in dim gray style - format_age() helper for human-readable relative timestamps - 2 new tests: test_tui_event_pane_renders_events, test_tui_event_pane_empty_state * feat(S02/T03): end-to-end SSE integration tests and dead_code cleanup - test_sse_end_to_end_post_to_stream: proves full POST → EventStore → EventBus → SSE path - test_sse_shutdown_closes_streams: proves CancellationToken terminates SSE connections - Removed blanket #[allow(dead_code)] from EventStore struct/impl - Added targeted #[allow(dead_code)] on len/is_empty/dropped (test-only methods) - All 426 workspace tests pass, zero failures, no dead_code warnings * feat(S03/T01): PeerUpdate type, signals module, run_id caching, and unit tests * feat(S03/T02): POST /api/v1/jobs/{id}/signals HTTP route with validation * feat(S03/T03): End-to-end signal pipeline tests and full regression * fix(S03): address PR review — run_id path traversal, mutex safety, collision-safe filenames, diagnostic logging* feat(S04/T01): fix CLI error chains, add is_orphan to WorktreeInfo, update schema snapshot - Replace 7 .map_err(|e| anyhow::anyhow!("{e}")) with ? in CLI worktree handlers (R104) - Add is_orphan: bool to WorktreeInfo with #[serde(default)] (R105) - Wire orphan cross-reference into list() using work_session phase check - Update worktree-info schema snapshot with new field - Update schema_roundtrip tests with is_orphan field * feat(S04/T02): add [orphan] marker to CLI worktree list + orphan-in-list unit tests - Append [orphan] marker to non-JSON worktree list output for orphaned entries - Add test_list_marks_orphan_entries proving no-session worktrees are flagged - Add test_list_marks_non_orphan_entries proving active-session worktrees are clean * feat(S04/T03): implement worktree_cleanup_all MCP tool with handler tests - Add worktree_cleanup_all MCP tool (R107) with orphans_only + force params - Default orphans_only=true, force=true for safe non-interactive bulk cleanup - Returns { removed: N, orphans_only: bool } JSON response - Individual failures warned, not fatal to batch - Remove TODO(M002) comment - Add test_worktree_cleanup_all_appears_in_tools + test_worktree_cleanup_all_empty_list - just ready green * fix(S04): address PR review findings - Fix false-orphan on I/O errors: distinguish WorkSessionNotFound (orphaned) from real I/O errors (warn + conservatively treat as active) in list() - Simplify detect_orphans() to delegate to list() is_orphan field - Add test_list_marks_terminal_session_as_orphan covering the terminal case --------- Co-authored-by: Test <test@test.com>61896d410c' d03eab153c