Skip to content

feat(fs5.5): add workspace plan release lifecycle proofs#59

Merged
adybag14-cyber merged 1 commit intomainfrom
fs55-ethernet-integration
Mar 19, 2026
Merged

feat(fs5.5): add workspace plan release lifecycle proofs#59
adybag14-cyber merged 1 commit intomainfrom
fs55-ethernet-integration

Conversation

@adybag14-cyber
Copy link
Owner

@adybag14-cyber adybag14-cyber commented Mar 19, 2026

Summary by CodeRabbit

  • New Features

    • Added workspace plan release management capabilities including save, list, view, activate, delete, and prune operations.
    • Plan releases are now persisted and can be used to snapshot and restore workspace plans.
  • Documentation

    • Updated README, hardware driver documentation, phase checklist, and port plan with plan release management details and lifecycle workflows.

@adybag14-cyber adybag14-cyber merged commit 297c0e3 into main Mar 19, 2026
14 of 15 checks passed
@coderabbitai
Copy link

coderabbitai bot commented Mar 19, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: dfd0976e-b53b-424d-bf1b-11cff694c210

📥 Commits

Reviewing files that changed from the base of the PR and between d8bebdd and 4ffc03f.

📒 Files selected for processing (9)
  • README.md
  • docs/zig-port/FS5_5_HARDWARE_DRIVERS_SYSTEMS.md
  • docs/zig-port/PHASE_CHECKLIST.md
  • docs/zig-port/PORT_PLAN.md
  • src/baremetal/tool_exec.zig
  • src/baremetal/tool_service.zig
  • src/baremetal/tool_service/codec.zig
  • src/baremetal/workspace_runtime.zig
  • src/baremetal_main.zig

📝 Walkthrough

Walkthrough

This PR introduces workspace plan release management, enabling snapshotting, listing, activation, deletion, and pruning of workspace plan versions. Adds persisted storage at /runtime/workspace-plan-releases/, new tool builtins, typed TCP service verbs, and runtime APIs with lifecycle control and metadata persistence.

Changes

Cohort / File(s) Summary
Documentation Updates
README.md, docs/zig-port/FS5_5_HARDWARE_DRIVERS_SYSTEMS.md, docs/zig-port/PHASE_CHECKLIST.md, docs/zig-port/PORT_PLAN.md
Added documentation for new workspace plan release slice with persistence paths, CLI builtins (workspace-plan-release-*), typed TCP verbs (WORKSPACEPLANRELEASE*), and updated proof flow to include save → mutate → list → info → activate → delete → prune with metadata readback assertions.
Service Layer
src/baremetal/tool_service.zig, src/baremetal/tool_service/codec.zig
Extended request operations, added WorkspacePlanReleaseRequest and WorkspacePlanReleasePruneRequest payload structs, implemented six new handler functions for list/info/save/activate/delete/prune operations with error wrapping and response formatting, updated framed request dispatcher to route new operations.
CLI Layer
src/baremetal/tool_exec.zig
Added six command handlers (workspace-plan-release-*) that call corresponding runtime APIs, parse arguments, format output strings, and extended test suite to validate save/mutate/list/info/activate/delete/prune workflow with assertions on release metadata.
Runtime Implementation
src/baremetal/workspace_runtime.zig
Implemented six public plan-release lifecycle APIs (planReleaseListAlloc, planReleaseInfoAlloc, snapshotPlanRelease, activatePlanRelease, deletePlanRelease, prunePlanReleases) with PlanReleaseMetadata persistence format, added error types WorkspacePlanReleaseNotFound and WorkspacePlanReleaseAlreadyExists, integrated filesystem scanning and sorting for release discovery and sequence calculation.
Integration Test
src/baremetal_main.zig
Extended TCP probe test with workspace plan release request sequence (IDs 236–246) including WORKSPACEPLANRELEASESAVE, WORKSPACEPLANRELEASELIST, WORKSPACEPLANRELEASEINFO, WORKSPACEPLANRELEASEACTIVATE, WORKSPACEPLANRELEASEDELETE, WORKSPACEPLANRELEASEPRUNE with response validation and filesystem readback assertions for plan/metadata artifacts.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant CLI as CLI (tool_exec)
    participant Service as TCP Service (tool_service)
    participant Runtime as Runtime (workspace_runtime)
    participant FS as Filesystem

    User->>CLI: workspace-plan-release-save v1
    CLI->>Runtime: snapshotPlanRelease(...)
    Runtime->>FS: Create /runtime/workspace-plan-releases/<name>/<plan>/v1/
    Runtime->>FS: Write plan.txt, release.txt (metadata)
    Runtime-->>CLI: Success
    CLI-->>User: Release saved

    User->>CLI: workspace-plan-release-list
    CLI->>Runtime: planReleaseListAlloc(...)
    Runtime->>FS: Scan release directories
    Runtime-->>CLI: List of releases
    CLI-->>User: [v1, v2, ...]

    User->>CLI: workspace-plan-release-info v1
    CLI->>Runtime: planReleaseInfoAlloc(...)
    Runtime->>FS: Read plan.txt, release.txt
    Runtime-->>CLI: Metadata + plan content
    CLI-->>User: Release info

    User->>CLI: workspace-plan-release-activate v1
    CLI->>Runtime: activatePlanRelease(...)
    Runtime->>FS: Read v1 plan.txt
    Runtime->>FS: Write to active plan location
    Runtime-->>CLI: Success
    CLI-->>User: Plan activated

    User->>CLI: workspace-plan-release-delete v2
    CLI->>Runtime: deletePlanRelease(...)
    Runtime->>FS: Remove /runtime/.../v2/
    Runtime-->>CLI: Success
    CLI-->>User: Release deleted

    User->>CLI: workspace-plan-release-prune keep=1
    CLI->>Runtime: prunePlanReleases(keep=1)
    Runtime->>FS: Sort by sequence, delete excess
    Runtime-->>CLI: {deleted: 2, kept: 1}
    CLI-->>User: Prune complete
Loading

Possibly related PRs

  • Fs55 ethernet integration #58: Established the foundational workspace orchestration surface with plan/suite runtime, persistence, and TCP verb machinery that this PR extends with plan-release management APIs, codec structures, and service handlers.

Poem

🐰 A rabbit hops through release trees,
Snapshots saved with metadata ease,
List and activate, delete and prune,
Workspace plans dance to new tune,
Plan releases bloom—spring has come! 🌱

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fs55-ethernet-integration
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant