Skip to content

feat(service): carry the pinned OpenSpec in the roadmap service image #1848

Closed as not planned

Description

@dan-petty

Friction

This is step 6 of 8 of the OpenSpec adoption decided in issue #1753 and docs/adr/0010-openspec-is-the-spec-and-change-proposal-layer.md. Once the release cut archives change folders, the process that cuts must be able to run openspec. Today the roadmap Service image (service stage of the Dockerfile) has Python, git, gh and the project's virtual environment, and no Node. While the Service is suspended (#1562), a person's devops release prepare runs the cut.

  • When the Service runs again, it will cut a release that holds change folders, and the cut calls openspec archive. Without Node and the pinned package in the image, the Service cannot cut such a release.
  • The alternative, keeping the cut a person's devops release prepare for good, leaves the Service unable to cut. The ADR's Decisions Taken records the owner's choice: the Service image carries Node.
  • The image must be right before chore(service): the roadmap service stays at 0 replicas, and its development is blocked, while its machine account is suspended #1562 is reverted, so the revert is not also an image change. Step 8 (refine through openspec instructions) also needs the tool in the Service.

Evidence

The ADR's Decisions Taken estimates the cost: a digest-pinned Node stage and npm ci from the same lockfile add about 138 MB apparent size (the 127 MB node binary and 11 MB of packages). npm ci --ignore-scripts of the pin installed 57 packages in 2 s in the trial, and the package declares no install scripts. The builder stage already copies src/, so the lockfile at src/devops_cli/tools_lock/openspec/package-lock.json (from the pin item) is in the build context without a new COPY of anything outside src/.

Feasibility to confirm in the change's proposal: which workflow builds the Service image and which pull request check predicts its release build, so the new stage is built by them before merge, and the architecture matrix the image supports (the gh download in the builder is keyed on TARGETARCH).

Existing tool considered

The official Node image and npm ci are the tools. A Node runtime installed by apt or a curl | sh installer would float; a digest-pinned image stage does not. The package is installed from the same lockfile devops install-tools uses, so the image and the devcontainer cannot drift.

The change

  • Dockerfile: a digest-pinned Node stage (the official image at the major in .node-version, referenced by its multi-arch index digest, resolved when the change is made) that runs npm ci --ignore-scripts --no-audit --no-fund --engine-strict --replace-registry-host=never against package.json and package-lock.json from src/devops_cli/tools_lock/openspec/, and a service stage that copies the node binary and the installed package and puts openspec on PATH.
  • The opt-outs in the image environment beside GH_NO_UPDATE_NOTIFIER=1: DO_NOT_TRACK=1, OPENSPEC_TELEMETRY=0 and OPENSPEC_NO_UPDATE_CHECK=1.
  • A contract test ties the image's Node major to .node-version, as the devcontainer's is tied by the pin item.
  • No manifest change. The roadmap Service stays at 0 replicas (chore(service): the roadmap service stays at 0 replicas, and its development is blocked, while its machine account is suspended #1562): this item does not scale, restart or re-push anything for roadmap-service, and if the proposal finds a manifest under k8s/devops/ has to change, it stays registered under devops k8s deploy-stack --stack all.
  • devops docs generate --sync-readme for any generated reference the change touches.

What it deletes

Nothing.

Tests

The test floor refuses every program but git, bwrap and a few kubectl forms, so no test builds the image or starts npm.

  • Dockerfile contract tests (the existing ones that read the Dockerfile, found with grep -rln Dockerfile tests) assert that the Node stage is referenced by digest, that the install uses npm ci --ignore-scripts from the committed lockfile and never npm install or a global install, that the opt-out variables are set, that the final stage runs as the unprivileged user, and that the Node major equals .node-version.
  • The image build runs in the workflow that builds the Service image on the pull request, which is the contract check against the real build.

Dependencies

Depends on the item titled "feat(install-tools): install OpenSpec from a pinned npm lockfile with telemetry off" (the lockfile and .node-version) and on "feat(release): archive complete OpenSpec changes at the release cut" (the cut that runs there). The sequence places it after the switch, and it does not need the switch itself.

Planning record: this item is planned as a change folder, because it lands after the switch item.

Acceptance criteria

  • The Service image contains the pinned Node and openspec 1.14.3, built from the same lockfile as devops install-tools, with telemetry and the update check off.
  • No install script runs in the build, and the final stage still runs as the unprivileged user.
  • The pull request check that builds the image builds the new stage, and the image's apparent size growth is reported in the pull request (about 138 MB expected).
  • deployment/roadmap-service is untouched and stays at 0 replicas.
  • devops ci passes.

Proposed design

Problem statement

The roadmap service image needs to include Node.js and the pinned OpenSpec tool to enable it to run the release cut process that archives change folders. Currently, the service image lacks Node and the necessary tools to execute openspec archive during release cuts.

Acceptance criteria

  • Criterion 1: The Service image contains the pinned Node and openspec 1.14.3, built from the same lockfile as devops install-tools, with telemetry and the update check off.
    Verification: Build the Dockerfile and verify that the service stage includes the node binary and installed packages from the specified lockfile, and that the opt-out environment variables are set.
  • Criterion 2: No install script runs in the build, and the final stage still runs as the unprivileged user.
    Verification: Examine the Dockerfile to ensure npm ci --ignore-scripts is used and verify the final stage runs with a non-root user.
  • Criterion 3: The pull request check that builds the image builds the new stage, and the image's apparent size growth is reported in the pull request (about 138 MB expected).
    Verification: Run the workflow that builds the Service image and confirm it includes the new Node stage and reports the expected size increase.
  • Criterion 4: The deployment/roadmap-service manifest stays at 0 replicas and is untouched.
    Verification: Check that the roadmap-service deployment configuration has not changed and remains at 0 replicas.
  • Criterion 5: devops ci passes with all tests including Dockerfile contract tests.
    Verification: Run devops ci and verify all checks pass, particularly the Dockerfile contract tests that validate the Node stage is referenced by digest, uses npm ci --ignore-scripts, sets opt-out variables, and runs as unprivileged user.

Key questions

  • Which workflow builds the Service image and which pull request check predicts its release build?: The workflow that builds the Service image on the pull request is the contract check against the real build, which will be run by the PR check that builds the image. [sources: src/devops_cli/tools_lock/openspec/package-lock.json]
  • What architecture matrix does the image support?: The image supports the architecture matrix determined by the gh download in the builder stage, which is keyed on TARGETARCH. [sources: docs/adr/0010-openspec-is-the-spec-and-change-proposal-layer.md]
  • Does the change require a manifest update for roadmap-service?: No manifest change is required. The roadmap Service stays at 0 replicas (chore(service): the roadmap service stays at 0 replicas, and its development is blocked, while its machine account is suspended #1562), and if there's a manifest under k8s/devops/ that has to change, it stays registered under devops k8s deploy-stack --stack all. [sources: docs/adr/0010-openspec-is-the-spec-and-change-proposal-layer.md]
  • What is the expected size increase of the image?: The expected size increase is about 138 MB apparent size (the 127 MB node binary and 11 MB of packages). [sources: docs/adr/0010-openspec-is-the-spec-and-change-proposal-layer.md]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#1753

Activity

  1. added
    source/agent
    type/feature
    on Oct 22, 2026
  2. dan-petty commented on Oct 22, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.

    • Type: type/feature. The candidate proposes adding a new feature to carry the pinned OpenSpec in the roadmap service image.
    • Priority: P1-High. This is part of a sequence of steps to adopt OpenSpec and enables critical release functionality.
    • Value: High. Enables the roadmap service to cut releases with change folders, which is essential for the OpenSpec adoption process.
    • Effort: Medium. Requires changes to Dockerfile, integration of Node stage, and contract tests, but leverages existing tooling and patterns.
  3. dan-petty commented on Oct 22, 2026

    @dan-petty
    OwnerAuthor

    Status set to Ready at ae8c2d9 (see proposed design in issue body).

  4. dan-petty commented on Oct 23, 2026

    @dan-petty
    OwnerAuthor

    Not planned: the release cut no longer archives OpenSpec changes; each closing pull request archives its own change (ADR 0010, ADR 0013).

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    source/agenttype/feature

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions