Repository navigation
OCI release smoke: full MCP session on amd64 + arm64 before tag promotion - #249
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
MCP smoke session and assertions scripts/smoke-oci.ts, src/app-integration.test.ts, VALIDATION.md |
The smoke script checks required tools, searches for firewall filter, fetches the first result, checks /ip/firewall children, and looks up RB5009. Tests cover response parsing and the chained calls. |
Native smoke jobs and tag promotion .github/workflows/release.yml, src/release.test.ts, CHANGELOG.md, MANUAL.md, VALIDATION.md, project-words.txt |
The workflow runs native amd64 and arm64 smoke legs, records image digests, and reports container diagnostics on failure. Promotion depends on both legs and applies version and eligible floating tags. Tests and release documentation describe the workflow and gate. |
Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Other · Severity of issue fixed: Medium
Sequence Diagram(s)
sequenceDiagram
participant ReleaseWorkflow
participant Publish
participant OCIRegistries
participant NativeSmokeRunners
participant SmokeScript
participant PromoteOCI
ReleaseWorkflow->>Publish: Publish SHA-tagged images
Publish->>OCIRegistries: Push images
ReleaseWorkflow->>NativeSmokeRunners: Run amd64 and arm64 smoke legs
NativeSmokeRunners->>OCIRegistries: Pull SHA-tagged images
NativeSmokeRunners->>SmokeScript: Run MCP session against each image
NativeSmokeRunners->>ReleaseWorkflow: Report smoke results
ReleaseWorkflow->>PromoteOCI: Start promotion after both legs pass
PromoteOCI->>OCIRegistries: Copy tested manifests to version and eligible floating tags
Possibly related issues
- 0.12.0 bounded release: current improvements, reliability fixes and release gates #204 — This change adds OCI smoke and promotion gates to the release workflow.
Possibly related PRs
- tikoci/rosetta#248 — This PR extends the same OCI smoke script and tests with the full chained MCP session.
Suggested reviewers: mobileskyfi
Merge Risk: 
Minimal · up to d22f5
-
This change adds native amd64 and arm64 MCP-session smoke tests that must pass before OCI version and floating tags are promoted. The review found no remaining merge-blocking issues. Releases still publish to npm and GitHub before the OCI smoke runs, as documented.
Pre-merge checks: 
5
-
Full details: Linked Issues check
-
Explanation
Directly linked issue
#246is the only active target. Its coding requirements are met by the reviewed head, with one partial verification gap.Verified in scripts/smoke-oci.ts at head:
- Real MCP session via StreamableHTTPClientTransport: initialize, then tools/list.
- tools/list must contain routeros_stats, routeros_search, routeros_get_page, routeros_command_tree, routeros_device_lookup. Missing tool exits 1.
- routeros_stats: provenance.release_tag must equal v<version>.
- routeros_search "firewall filter": pageCount must be > 0.
- routeros_get_page: id taken from firstSearchPageId(), not hardcoded. Text or sections must be nonzero.
- routeros_command_tree /ip/firewall: childCount must be > 0.
- routeros_device_lookup RB5009: deviceCount must be > 0.
- Every call checks isError and fails on true.
- Script takes any URL and version (CLI unchanged).
Verified in release.yml header comment at head: job graph is build -> qa -> publish -> smoke-oci (one leg per arch) -> promote-oci, and promote-oci needs both smoke-oci legs.
Not verified line by line: release.yml is truncated at 16000 bytes. The smoke-oci job body (ubuntu-24.04-arm leg, docker image inspect arch assertion, digest job summary, failure diagnostics) and the release.test.ts pins rest on the change summary and PR description. The workflow header is consistent with them.
Covers [
#246] objectives: real MCP chain, both legs, arch assertion, promotion gating, local smoke runner, docs, structural tests.
Full details: Out of Scope Changes check
-
Explanation
Changes map to
#246scope:- scripts/smoke-oci.ts: smoke chain and parsing helpers (
#246items 1 and local runner). - src/app-integration.test.ts: pins helpers and chain of the shared smoke script. Supports the script; does not touch /app deployment or CHR behavior (
#245). - .github/workflows/release.yml: smoke-oci and promote-oci jobs, sha-only publish, and gating (
#246items 2 to 4). - src/release.test.ts: structural pins for job graph (
#246acceptance). - VALIDATION.md, MANUAL.md, CHANGELOG.md [Unreleased]: docs the issue requests.
- project-words.txt: adds 'binfmt', needed for the new docs and workflow text.
No change found for out-of-scope items: standalone binary ZIP smoke, binary retirement, /app or CHR changes, or running the OCI smoke on PRs. The app-integration dispatch run is a verification step, not a code change.
Limit: release.yml was read only partially (see linkedIssuesAssessment). Its changes were judged from the header and change summary.
- scripts/smoke-oci.ts: smoke chain and parsing helpers (
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 83.33% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 6 functions across 3 files. (5 skipped: 5 unsupported.)
-
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
|
App-integration rehearsal with the stronger smoke checks dispatched from this branch: https://github.com/tikoci/rosetta/actions/runs/41162653592 (image |
|
Rehearsal result: both legs pass with the stronger checks (run 41162653592, image |
Closes #246.
What
The release OCI smoke ran only the amd64 image, and any non-404 HTTP response passed. Now both pushed images prove themselves with a real MCP session before
:latest/:nextmove:scripts/smoke-oci.tsruns the full chain: initialize → tools/list (all 5 exercised tools required) →routeros_statsprovenance match →routeros_search"firewall filter" →routeros_get_pagechained from the first result's id →routeros_command_tree/ip/firewall→routeros_device_lookupRB5009. Every call isisError-gated; assertions stay structural (nonempty, right shape). The<url> <version>CLI is unchanged, soscripts/app-integration.tsuses it as-is.release.yml: newsmoke-ocijob (native amd64 leg onubuntu-latest, native arm64 leg onubuntu-24.04-arm, no QEMU) replaces the curl probe; each leg pulls both registries, asserts the pulled image is its own arch, and records the manifest + platform digests in the job summary. Newpromote-ocijob (needs: [build, publish, smoke-oci]) owns tag promotion — a red leg leaves floating tags untouched. Failure diagnostics (inspect state/exit/OOM, container logs, MCP error) are kept on both failure paths.src/app-integration.test.ts; job-graph, leg, arch-assertion, digest-record, and diagnostics pins insrc/release.test.ts.VALIDATION.mdgainsV-oci-mcp-amd64/V-oci-mcp-arm64(blocking) and extendsV-oci-latest-guard/V-release-structure;MANUAL.mdrelease graph updated; CHANGELOG entry under[Unreleased].Verification
bun testfull suite: 1469 pass, 0 fail;bun run typecheck,make lintclean.bun scripts/smoke-oci.ts http://localhost:<port>/mcp <version>against a live local server: SMOKE OK (219ms), including the TOC-shaped get_page branch; wrong-version and no-arg paths fail correctly (exit 1 / 2).app-integration.ymldispatch from this branch to confirm the stronger checks pass on x86 + arm64 CHR: will link the run here.Note
Run full MCP smoke session on amd64 and arm64 OCI images before tag promotion
smoke-ocimatrix job in release.yml that pulls the sha-tagged images from Docker Hub and GHCR on native amd64 and arm64 runners, asserts each image's reported architecture, and runs the MCP smoke sessionrouteros_get_pagechained from a search result id,routeros_command_tree, androuteros_device_lookupfor RB5009, with JSON parsers that reject empty or malformed responsespromote-ocijob that copies the sha-tagged manifest to the version tag and applicable floating tags (:latest,:next) only after both smoke legs pass; thepublishjob now pushes only sha tagspublishjob; they are promoted only inpromote-ociafter build, publish, and smoke-oci succeedMacroscope summarized d22f5d3.
Summary by CodeRabbit