Skip to content

OCI release smoke: full MCP session on amd64 + arm64 before tag promotion - #249

Merged
Amm0Bot merged 1 commit into
mainfrom
feat/oci-smoke-mcp
Oct 31, 2026
Merged

Amm0Bot merged 1 commit into
mainfrom
feat/oci-smoke-mcp

Conversation

@Amm0Bot

@Amm0Bot Amm0Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

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 / :next move:

  • scripts/smoke-oci.ts runs the full chain: initialize → tools/list (all 5 exercised tools required) → routeros_stats provenance match → routeros_search "firewall filter" → routeros_get_page chained from the first result's id → routeros_command_tree /ip/firewall → routeros_device_lookup RB5009. Every call is isError-gated; assertions stay structural (nonempty, right shape). The <url> <version> CLI is unchanged, so scripts/app-integration.ts uses it as-is.
  • release.yml: new smoke-oci job (native amd64 leg on ubuntu-latest, native arm64 leg on ubuntu-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. New promote-oci job (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.
  • Tests: assertion-helper units + smoke-chain pin in src/app-integration.test.ts; job-graph, leg, arch-assertion, digest-record, and diagnostics pins in src/release.test.ts.
  • Docs: VALIDATION.md gains V-oci-mcp-amd64 / V-oci-mcp-arm64 (blocking) and extends V-oci-latest-guard / V-release-structure; MANUAL.md release graph updated; CHANGELOG entry under [Unreleased].

Verification

  • bun test full suite: 1469 pass, 0 fail; bun run typecheck, make lint clean.
  • 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.yml dispatch 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

  • Adds a smoke-oci matrix 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 session
  • Expands scripts/smoke-oci.ts to cover routeros_get_page chained from a search result id, routeros_command_tree, and routeros_device_lookup for RB5009, with JSON parsers that reject empty or malformed responses
  • Adds a promote-oci job that copies the sha-tagged manifest to the version tag and applicable floating tags (:latest, :next) only after both smoke legs pass; the publish job now pushes only sha tags
  • Updates docs, changelog, validation matrix, and structural tests in release.test.ts and app-integration.test.ts
  • Behavioral Change: version and floating OCI tags are no longer pushed in the publish job; they are promoted only in promote-oci after build, publish, and smoke-oci succeed

Macroscope summarized d22f5d3.

Summary by CodeRabbit

  • Release Improvements
    • Container images are now tested on both amd64 and arm64 before release tags are updated. Checks verify each image’s architecture and exercise key MCP features.
    • If either architecture fails validation, version and floating release tags are not promoted.
  • Documentation
    • Updated release and validation documentation to describe the architecture checks and tag-promotion process.

@coderabbitai

coderabbitai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 7223c11 and d22f5d3.

Files selected for processing: 8
  • .github/workflows/release.yml
  • CHANGELOG.md
  • MANUAL.md
  • VALIDATION.md
  • project-words.txt
  • scripts/smoke-oci.ts
  • src/app-integration.test.ts
  • src/release.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Recent review details
Context from checks skipped due to timeout: 7
  • GitHub Check: Macroscope - Correctness Check
  • GitHub Check: test
  • GitHub Check: db-lifecycle (macos-latest)
  • GitHub Check: Analyze (actions)
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: db-lifecycle (windows-latest)
  • GitHub Check: Analyze (javascript-typescript)
Additional context used
Code guidelines: 1
MANUAL.md — auto-discovered
Path-based instructions: 1
Applicability reference: AGENTS.md: # Codex instructions for rosetta Codex reads this file as the repo-local entrypoint.

CodeRabbit inference engine (MANUAL.md)

Files:

  • CHANGELOG.md
Learnings: 5
Learning: 2026-07-12T20:33:31.549Z
Learnt from: mobileskyfi
Repo: tikoci/rosetta PR: 52
File: .github/workflows/release.yml:433-433
Timestamp: 2026-07-12T20:33:31.549Z
Learning: In this repo, GitHub Actions used in workflow files should be pinned to version tags (e.g., actions/checkoutvX, not full commit SHAs). During code review, do not flag or fail checks that look like “unpinned-uses”/“SHA pinning required” (e.g., zizmor unpinned-uses) for actions/checkout, actions/download-artifact, or other third-party actions referenced from `.github/workflows`—keep the existing tag-pinning policy so Dependabot’s `github_actions` tracking and GitHub’s action security advisory visibility against tagged refs are preserved.

Applied to files:

  • .github/workflows/release.yml
Learning: 2026-07-12T20:33:36.397Z
Learnt from: mobileskyfi
Repo: tikoci/rosetta PR: 52
File: .github/workflows/release.yml:74-74
Timestamp: 2026-07-12T20:33:36.397Z
Learning: For this repo (tikoci/rosetta), workflow files in .github/workflows should keep GitHub Actions `actions/*` pinned to version tags (e.g., `v3`, `v4`) rather than full commit SHAs. Do not raise/retain findings that would otherwise complain about unpinned uses (e.g., zizmor `unpinned-uses`) or SHA pinning, unless the maintainer later enables an org-wide enforcement policy requiring SHA pinning.

Applied to files:

  • .github/workflows/release.yml
Learning: 2026-07-12T20:33:29.883Z
Learnt from: mobileskyfi
Repo: tikoci/rosetta PR: 52
File: .github/workflows/qa.yml:101-101
Timestamp: 2026-07-12T20:33:29.883Z
Learning: In tikoci/rosetta, GitHub Actions workflow steps that reference official actions (e.g., `actions/checkout`, `actions/download-artifact`) may intentionally use version tags (e.g., `v4`, `v3`) instead of full commit SHAs. During code review, do not flag these unpinned `actions/*` tag references as a GitHub Actions security issue for this repository, because Dependabot’s `github_actions` updates tagged refs and GitHub surfaces action security advisories against tagged refs.

Applied to files:

  • .github/workflows/release.yml
Learning: 2026-07-12T20:33:35.489Z
Learnt from: mobileskyfi
Repo: tikoci/rosetta PR: 52
File: .github/workflows/codeql.yml:29-29
Timestamp: 2026-07-12T20:33:35.489Z
Learning: In this repo’s GitHub Actions workflows, preserve the maintainer’s security/maintenance intent: action references under `actions/*` may use version tags (e.g., `actions/checkoutv7`) instead of full commit SHAs, and `actions/checkout` may intentionally keep `persist-credentials: true`. During review, do not raise issues suggesting SHA pinning for `actions/*` or proposing `persist-credentials: false` unless the project adopts an org-wide policy that enforces SHA pinning.

Applied to files:

  • .github/workflows/release.yml
Learning: 2026-07-12T20:33:42.621Z
Learnt from: mobileskyfi
Repo: tikoci/rosetta PR: 52
File: .github/workflows/test.yml:19-19
Timestamp: 2026-07-12T20:33:42.621Z
Learning: In tikoci/rosetta workflows, follow the maintainer policy: do not require GitHub Actions step refs under `actions/*` (e.g., `actions/checkout`) to be pinned to full commit SHAs, and do not require `persist-credentials: false` to be set on `actions/checkout` (or other `actions/*`) by default. Only flag missing SHA pinning or missing `persist-credentials: false` if the maintainer explicitly indicates the policy has changed (for example, adopting an org-wide SHA-pinning enforcement).

Applied to files:

  • .github/workflows/release.yml
zizmor (1.30.1)
.github/workflows/release.yml

[warning] 940-940: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)

[warning] 972-972: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)

[error] 940-940: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

[error] 942-942: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

[error] 949-949: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

[error] 952-952: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

[error] 958-958: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

[error] 1076-1076: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

[error] 1079-1079: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

[error] 1085-1085: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

[info] 928-928: workflow or action definition without a name (anonymous-definition): this job

(anonymous-definition)

[info] 1071-1071: workflow or action definition without a name (anonymous-definition): this job

(anonymous-definition)

Additional comments: 5
src/release.test.ts: 1

680-688: LGTM!

Also applies to: 708-709, 720-727, 731-808

CHANGELOG.md: 1

28-28: LGTM!

MANUAL.md: 1

312-317: LGTM!

project-words.txt: 1

45-45: LGTM!

.github/workflows/release.yml: 1

1118-1118: Data Integrity & Integration

The workflow-level concurrency prevents the claimed cross-run retagging race.

All release runs use the release concurrency group with cancel-in-progress: false. A second dispatch or republish_assets run cannot replace sha-${SHORT_SHA} while the first run is between smoke-oci and promote-oci. The digest-pinning change is not required for the stated race.

Walkthrough

OCI releases now run a full MCP smoke session against native amd64 and arm64 images before tag promotion. The workflow publishes SHA-tagged images first, then promotes tested manifests to version and eligible floating tags only after both smoke legs pass.

Changes: OCI release gate

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
Loading

Possibly related issues

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: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: full OCI release smoke testing on amd64 and arm64 before tag promotion.
Linked Issues check Passed Directly linked issue #246 is 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 ses…
Out of Scope Changes check Passed Changes map to #246 scope:
- scripts/smoke-oci.ts: smoke chain and parsing helpers (#246 items 1 and local runner).
- src/app-integration.test.ts: pins helpers and chain of the shared smoke script. Su…
Docstring Coverage Passed 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. Documentati…
Full details: Linked Issues check

Explanation

Directly linked issue #246 is 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 #246 scope:

  • scripts/smoke-oci.ts: smoke chain and parsing helpers (#246 items 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 (#246 items 2 to 4).
  • src/release.test.ts: structural pins for job graph (#246 acceptance).
  • 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.

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.

Share

@Amm0Bot

Amm0Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

App-integration rehearsal with the stronger smoke checks dispatched from this branch: https://github.com/tikoci/rosetta/actions/runs/41162653592 (image ghcr.io/tikoci/rosetta:v0.12.0, x86 + arm64 legs). Will report the result here.

@Amm0Bot

Amm0Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

Rehearsal result: both legs pass with the stronger checks (run 41162653592, image ghcr.io/tikoci/rosetta:v0.12.0). Each leg's log shows the full chain through the CHR /app endpoint: routeros_get_page: id=85 text=0 chars sections=7, routeros_command_tree: /ip/firewall has 10 children, routeros_device_lookup: RB5009 matched 3 devices, SMOKE OK. x86 passed in ~98s, arm64 in ~254s.

@Amm0Bot
Amm0Bot merged commit a51b201 into main Oct 31, 2026
13 checks passed
@Amm0Bot
Amm0Bot deleted the feat/oci-smoke-mcp branch October 31, 2026 03:16
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.

Release OCI smoke: real MCP session on both amd64 and arm64 images before tag promotion

2 participants