Skip to content

Fs55 ethernet integration#73

Merged
adybag14-cyber merged 3 commits intomainfrom
fs55-ethernet-integration
Mar 21, 2026
Merged

Fs55 ethernet integration#73
adybag14-cyber merged 3 commits intomainfrom
fs55-ethernet-integration

Conversation

@adybag14-cyber
Copy link
Owner

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

Summary by CodeRabbit

  • New Features

    • Added benchmark suite with configurable duration, warmup, and filtering capabilities.
    • Added read-only /proc and /sys virtual filesystem overlays exposing runtime and storage state.
    • Introduced zig build bench command for executing benchmarks with customizable parameters.
  • Chores

    • Added benchmark smoke check validation to CI/release preview workflows.
    • Updated documentation and roadmap reflecting delivered benchmark and virtual filesystem features.

@coderabbitai
Copy link

coderabbitai bot commented Mar 21, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

This PR delivers two major adoption slices for ZigOS integration in ZAR: a hosted benchmark suite with CLI entry point and CI smoke-gate validation, and a read-only virtual filesystem overlay for /proc and /sys directories integrated with tool-service execution and E1000 probe validation. Documentation and licensing acknowledgment updated to reflect explicit upstream MIT status and corresponding adaptation scope.

Changes

Cohort / File(s) Summary
CI Benchmark Integration
.github/workflows/release-preview.yml, .github/workflows/zig-ci.yml
Added "Benchmark smoke lane" step running ./scripts/benchmark-smoke-check.ps1 -SkipBuild immediately after build/test in the validate job.
Benchmark Suite & CLI
src/benchmark_suite.zig, src/benchmark_main.zig, build.zig, scripts/benchmark-smoke-check.ps1
Implemented benchmark module with case catalog (DNS/DHCP roundtrip, TCP handshake, runtime state cycling, codec parsing), CLI with --list, --duration-ms, --warmup-ms, --filter options, build steps bench and bench-smoke, and PowerShell smoke-gate script with output validation markers (BENCH:START, BENCH:CASE, BENCH:END).
Virtual Filesystem Layer
src/baremetal/virtual_fs.zig
New read-only virtual filesystem module implementing /proc and /sys overlays with path handling, file/directory rendering, and stat operations dispatching to runtime, storage, display, and network backends.
Filesystem Integration & Restrictions
src/baremetal/filesystem.zig
Integrated virtual filesystem layer with write-operation restrictions for /proc and /sys paths; added ReadOnlyPath error, dispatch routing for reads/lists/stats, and test coverage for overlay behavior and error handling.
Tool Execution & Service Tests
src/baremetal/tool_exec.zig, src/baremetal/tool_service.zig
Added integration tests verifying virtual /proc (runtime snapshot/sessions) and /sys (storage state) overlays are accessible and correctly formatted through tool execution and service framing.
E1000 Probe Extensions
src/baremetal_main.zig
Extended QEMU E1000 tool-service probe with four additional TCP exchanges (REQ 24–27) validating virtual filesystem directory/file listings, snapshot state paths, storage backend detection, and stat metadata for /proc/runtime/snapshot.
Network Bundle Compatibility
src/pal/net.zig
Added emptyCertificateBundle() helper function ensuring consistent empty bundle initialization across Zig versions; updated bundle-trust initialization and clearing to use this helper.
Lightpanda Error Mapping
src/bridge/lightpanda.zig
Added compatHttpErrorName() helper mapping error.Unexpected to "ConnectionRefused" string for HTTP error reporting compatibility.
Documentation: Benchmark Planning
docs/zig-port/ZAR_VS_ZIGOS_BENCHMARK_SLICE_PLAN.md
New document defining benchmark slice scope (suite, executable, smoke-gate), delivered cases, output contract format, validation gates, and follow-on expansion suggestions.
Documentation: ZigOS Integration & Licensing
docs/zig-port/ZAR_VS_ZIGOS_INTEGRATION_PLAN.md, docs/zig-port/FS5_5_HARDWARE_DRIVERS_SYSTEMS.md, docs/zig-port/PHASE_CHECKLIST.md, docs/zig-port/PORT_PLAN.md, README.md
Updated licensing from "clean-room only" to explicit upstream MIT, documented two delivered adoption slices (benchmark lane and read-only /proc//sys overlay), updated test pass counter, and refined integration planning scope and provenance boundaries.

Sequence Diagram(s)

sequenceDiagram
    participant Client as filesystem.zig<br/>Operation
    participant VFS as virtual_fs.zig<br/>Dispatcher
    participant RB as runtime_bridge<br/>(snapshots/sessions)
    participant SB as storage_backend<br/>(state)
    participant DO as display_output<br/>(outputs/modes)
    participant PN as pal.net<br/>(routes)

    Client->>VFS: readFileAlloc("/proc/runtime/snapshot")?
    alt Virtual Path Recognized
        VFS->>VFS: renderFileAlloc()
        VFS->>RB: Fetch runtime snapshot
        RB-->>VFS: Serialized state
        VFS-->>Client: File content
    else Dispatch to Backend
        VFS->>SB: Query storage state for "/sys/storage/state"
        SB-->>VFS: Backend identifier + state JSON
        VFS-->>Client: File content
    end

    Client->>VFS: listDirectoryAlloc("/proc/runtime/sessions")?
    VFS->>VFS: isDirectoryPath()?
    alt Directory Exists
        VFS->>RB: Enumerate sessions
        RB-->>VFS: Session IDs
        VFS->>VFS: Format "dir session-<id>" entries
        VFS-->>Client: Directory listing
    else Not Found
        VFS-->>Client: FileNotFound error
    end

    Client->>VFS: statSummary("/sys/display/outputs/0/detail")?
    VFS->>DO: Fetch output detail
    DO-->>VFS: Rendered detail string
    VFS->>VFS: Compute checksum over buffer
    VFS-->>Client: SimpleStat{kind, size, checksum}
Loading

Possibly related issues

Possibly related PRs

Poem

🐰 A rabbit rejoices in the warren's new rooms—
Virtual /proc and /sys bloom like forest mushrooms,
Benchmarks now race through their measured lanes,
While QEMU probes skip across zig-zagging planes,
The ZigOS door opens: MIT light shines through! 🌟

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Fs55 ethernet integration' is overly broad and vague—it mentions Ethernet, but the changeset encompasses extensive benchmark suite implementation, virtual filesystem overlays (/proc, /sys), CI workflow additions, and ZigOS integration planning documentation that extend well beyond Ethernet-specific work. Consider a more specific title like 'Add benchmark suite and virtual /proc/sys overlays with CI integration' or 'Deliver benchmark slice and read-only procfs/sysfs overlays' to accurately reflect the multi-faceted scope of this changeset.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fs55-ethernet-integration

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

Tip

CodeRabbit can use TruffleHog to scan for secrets in your code with verification capabilities.

Add a TruffleHog config file (e.g. trufflehog-config.yml, trufflehog.yml) to your project to customize detectors and scanning behavior. The tool runs only when a config file is present.

@adybag14-cyber adybag14-cyber merged commit 9055bad into main Mar 21, 2026
12 of 14 checks passed
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