Skip to content

ci(stagex): build parser_http_server and parser_grpc_server images - #447

Closed
pepe-anchor wants to merge 2 commits into
mainfrom
pepefigueira/prs-581-02-stagex-multitarget
Closed

ci(stagex): build parser_http_server and parser_grpc_server images#447
pepe-anchor wants to merge 2 commits into
mainfrom
pepefigueira/prs-581-02-stagex-multitarget

Conversation

@pepe-anchor

Copy link
Copy Markdown
Contributor

Why

PRS-581 deploys parser_http_server as the TVC pivot. The stagex "TVC deployment details" step hardcodes parser_app, so it is the only binary that ever gets a reproducible executable digest and a paste-ready deploy block. Without this, the pivot cannot be deployed or probed at all, which blocks the /dev/nsm reachability probe and every later step in the stack.

Landing it early so image builds are never the thing holding the stack up.

What

  • Adds parser_grpc_server and parser_http_server to the stagex build matrix.
  • Generalizes the deployment-details step over the matrix target: TARGET_NAME env, per-target container URL, per-target extract container and binary path, per-target deploy-md and release-note sentinels so parallel matrix legs cannot clobber each other's release body edits.
  • Adds images/parser_http_server/Containerfile, mirroring parser_app's. It keeps --features "vsock ${CHAIN_FEATURES}", which is load-bearing: vsock switches qos_core::EPHEMERAL_KEY_FILE to the in-enclave path, and without it the deployed pivot panics at startup and TVC reports 0 healthy replicas.

Two changes from the x402 branch were deliberately NOT taken, because they belong to other PRs:

  • the PR-label rename ci:stagex to stagex. Main's label is kept.
  • qos_version="v2026.2.6". Main's 0.12.0 is kept; the QOS bump is its own PR in this stack.

Test evidence

The stagex path only runs on a labelled PR, so this needs the ci:stagex label to be validated. What was verified locally:

python3 -c "import yaml; yaml.safe_load(open('.github/workflows/stagex.yml'))"  -> parses
grep 'label.name' stagex.yml  -> 'ci:stagex'  (unchanged from main)
grep -c 'v2026.2.6' stagex.yml -> 0

I have NOT run the stagex build itself. Please add ci:stagex and confirm all matrix legs go green, including the two new ones, before merging.

Rollback

Revert the commit. CI-only change plus one new Containerfile; nothing is deployed by merging it.

Linear

PRS-581

Stack position: independent of the rest of the stack, based on main. Can merge in any order.

🤖 Generated with Claude Code

The TVC deployment-details step hardcoded parser_app, so the only binary
that ever got a reproducible digest and a paste-ready deploy block was
parser_app. The pivot we are switching to (parser_http_server) needs the
same treatment before it can be deployed or probed.

Generalize the extraction over the matrix target and add the two missing
images. QOS version stays at 0.12.0 here; the bump is PRS-581 PR 7.

Co-Authored-By: Claude <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds StageX image builds and deployment metadata for additional parser servers.

Changes:

  • Adds gRPC and HTTP server matrix targets.
  • Generalizes TVC deployment details per target.
  • Adds an HTTP server Containerfile.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
.github/workflows/stagex.yml Extends image builds and TVC release metadata.
images/parser_http_server/Containerfile Defines the HTTP server image build.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

# pre-fetch all workspace deps; we need them to build with `--network=none` later
RUN cargo fetch

WORKDIR /src/parser/http-server
Comment thread .github/workflows/stagex.yml Outdated
Comment on lines 227 to 241
if [ -n "$SEMVER_TAG" ] && gh release view "$SEMVER_TAG" >/dev/null 2>&1; then
existing_body=$(gh release view "$SEMVER_TAG" --json body --jq .body)
preserved=$(printf '%s\n' "$existing_body" | awk '
/<!-- BEGIN_TVC_DEPLOY -->/ { skipping = 1; next }
/<!-- END_TVC_DEPLOY -->/ { skipping = 0; next }
preserved=$(printf '%s\n' "$existing_body" | awk -v b="$begin_sentinel" -v e="$end_sentinel" '
$0 == b { skipping = 1; next }
$0 == e { skipping = 0; next }
!skipping
')
new_body="${RUNNER_TEMP}/release_notes.md"
new_body="${RUNNER_TEMP}/release_notes_${TARGET_NAME}.md"
{
printf '%s\n\n' "$preserved"
echo "<!-- BEGIN_TVC_DEPLOY -->"
echo "$begin_sentinel"
cat "$deploy_md"
echo "<!-- END_TVC_DEPLOY -->"
echo "$end_sentinel"
} > "$new_body"
gh release edit "$SEMVER_TAG" --notes-file "$new_body" \
Comment on lines +50 to +51
- name: parser_grpc_server
- name: parser_http_server
The matrix gained parser_grpc_server and parser_http_server, but the root
Makefile had no rule for either, so both legs died at the Build step before
Docker ran. images/parser_grpc_server/Containerfile was missing entirely.

parser_grpc_server mirrors parser_gateway rather than parser_app: the crate
has no [features] table and is not a TVC pivot, so vsock/CHAIN_FEATURES are
deliberately omitted. Chains still link in through parser_app's default
features, since --no-default-features applies to the package being built,
not to its path dependencies.

Also fixes a lost update on the release body. Three legs now run the
deployment-details step concurrently, each doing gh release view then
gh release edit with a full-body overwrite. Per-target sentinels keep a
leg's own block idempotent across re-runs but do not serialize legs, so
whichever edit landed last dropped the others' sections. Retry with a
fresh read and verify the write stuck.

Co-Authored-By: Claude <noreply@anthropic.com>
pepe-anchor added a commit that referenced this pull request Aug 25, 2026
…e pivot PR

PR 02 added the image build plumbing but not the parser/http-server crate,
which lands here. Neither half built on its own, so the features move into
this PR and #447 is closed rather than merged.

Co-Authored-By: Claude <noreply@anthropic.com>
@pepe-anchor

Copy link
Copy Markdown
Contributor Author

Closing unmerged. The features moved into #450.

The split did not work: this PR added images/parser_http_server/Containerfile and the stagex matrix entry, but the parser/http-server crate they build lands in #450. Neither half built on its own, and PR 03 carried no Containerfile, Makefile rule, or stagex entry of its own.

Two other things were broken here and are fixed in #450:

  • The root Makefile had no rule for out/parser_grpc_server/index.json or out/parser_http_server/index.json, so both new legs died at the Build step before Docker ran. images/parser_grpc_server/Containerfile was missing entirely.
  • Generalizing the deployment-details step over the matrix took it from one leg to three running concurrently, each doing gh release view then gh release edit with a full-body overwrite. Per-target sentinels keep a leg idempotent across re-runs but do not serialize legs, so whichever edit landed last silently dropped the others sections. feat(parser_http_server): HTTP+JSON pivot for TVC public ingress #450 retries with a fresh read and verifies the write stuck.

Verified on the merged branch: all five make -n out/<target>/index.json rules resolve, the workflow parses and every run: block passes bash -n, and both new targets compile as their Containerfiles build them (cargo check -p parser_http_server --no-default-features --features "vsock ethereum solana sui tron unspecified" and cargo check -p parser_grpc_server --no-default-features).

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.

2 participants