Skip to content

Align workspace workflow and assets on a release channel - #165

Closed
gas2own wants to merge 10 commits into
mainfrom
workspace-single-version
Closed

gas2own wants to merge 10 commits into
mainfrom
workspace-single-version

Conversation

@gas2own

@gas2own gas2own commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

The workspace workflow and its fetched assets now follow the same ref in a project's docs.yml. New projects default to @latest, which advances only when a final release has a validated slim and TeX image pair. Projects can choose a fixed @vX.Y.Z tag or @main instead. ASTA_PLUGINS_REF remains a local override.

The release workflow selects the highest published final tag, advances the existing latest branch, then retags the images. A branch update failure stops before :latest images move. A temporary CI probe used GITHUB_TOKEN with contents: write to advance a test ref across workflow changes; the test ref was deleted. The first actual final-release promotion remains untested.

The devcontainer image tag is configured separately in devcontainer.json; this PR does not make it follow docs.yml automatically. With @latest, downstream projects receive a release without a bump PR. Projects that require an approval gate should pin a release tag.

Open policy choice before merge: refs/heads/latest is currently unprotected, so anyone with repository write access can advance the default workflow ref. Restricting updates to a release identity needs a repository ruleset and credential managed by an administrator; the alternative is to accept this documented risk or keep fixed release tags as the scaffold default. The review resolution covers the remaining findings. The automatic AI-review budget is spent; the skills eval is running.

Reviewer requested: jbragg

Suggested-by: @jbragg

The Makefile reads its ref from the docs.yml uses: line, so the workflow
and the evidence extension move together. A release now also moves a
latest branch alongside the :latest image, so projects can follow
@latest as a safer floating choice than @main.

Suggested-by: @jbragg
@gas2own

gas2own commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor Author

Automated review status

  • codex review of 41013a3, commit 41013a3 (job gas2own-bd8c9a912c58) — findings posted; follow-up on executor dispatch-611b3059a8474118
  • claude review of 652c9d4 (job gas2own-75936ed1baea) — findings posted; follow-up on executor dispatch-8254dde7a7254f8e done
  • codex review of 6cf1966 (job gas2own-aa69f3269ec6) — running
  • claude review of 0a73dd8 (job gas2own-6186f77886d1) — findings posted; follow-up on executor dispatch-0d5b5bc83ecc4bd7
  • codex review of a318065 (job gas2own-d438e433148c) — findings posted; follow-up on executor dispatch-c3c382d4f4a54795
  • claude review of cec157e (job gas2own-ee0db97265d0) — findings posted; follow-up on executor dispatch-aec34a1abd2744af done

Now: waiting on codex review of 6cf1966.

@gas2own

gas2own commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Independent AI code review (Codex) — commit 41013a38cd0c

Automated review of commit 41013a3 of the PR by a separately invoked Codex reviewer. Prioritised P0/P1/P2; treat as advisory input for the human reviewer, not a merge gate.

P0 (blocking)

None.

P1 (should fix)

  • .github/workflows/docker.yml:202 — actions/checkout@v4 uses a shallow checkout by default. If $newest is a different release tag from the one that triggered this run, git rev-list can fail after the image has been updated, leaving the latest branch stale. Fetch refs/tags/$newest explicitly before resolving its SHA.

P2 (nits)

None.

Recommendation: request-changes

@gas2own

gas2own commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

The review's checkout-depth finding needs no code change. The latest job already sets fetch-depth: 0 on actions/checkout@v4, and its preceding step runs git fetch --tags --force origin before selecting $newest. Thus git rev-list -n 1 "$newest" can resolve a final release tag other than the tag that triggered the run. I fetched the tags and resolved both v0.104.1 and v0.103.0 locally.

The finding appears to have missed that checkout configuration. There is no fix commit to re-review. The first live latest branch update still occurs at the next final release, as the PR description notes.

@gas2own
gas2own requested a review from jbragg October 4, 2026 01:55
@gas2own
gas2own marked this pull request as ready for review October 4, 2026 01:56
The asta CLI follows the installed plugin's release, the dev container
image defaults to :latest, and the evidence fetch defaulted to the newest
release tag. Make the docs.yml scaffold follow the same latest-release
channel; pinning a vX.Y.Z stays an opt-in.
@gas2own

gas2own commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

ca2cef4 makes @latest the scaffold default instead of a pinned @vX.Y.Z, matching how the rest of asta-plugins upgrades: the plugins' SessionStart hook installs the asta CLI at the installed plugin's release, the dev container image defaults to :latest, and the evidence fetch already defaulted to the newest release tag. Pinning @vX.Y.Z and following @main remain opt-in. make set-version no longer rewrites the scaffold ref when it is @latest, and the version-consistency check accepts it.

The latest branch now exists at v0.104.1 (the release :latest points to), so uses: ...@latest resolves before the first release that moves it.

Suggested-by: @jbragg

@gas2own
gas2own marked this pull request as draft October 4, 2026 05:00
@gas2own

gas2own commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Independent AI code review (Claude)

Automated review of the PR by a separately invoked Claude reviewer. Prioritised P0/P1/P2; treat as advisory input for the human reviewer, not a merge gate.

P0 (blocking)

  • Bootstrap gap. plugins/asta-tools/skills/workspace/assets/docs.yml:31 makes new scaffolds use @latest, but refs/heads/latest is only created by the new step at .github/workflows/docker.yml:199-210. That step runs after the next release's image promotion. Until then, every newly scaffolded project's docs workflow fails to resolve the reusable workflow. Fix: create the latest branch manually at the current release before merging, or keep the scaffold pinned until the first release has created the branch.
  • GITHUB_TOKEN may be rejected when moving the branch. At .github/workflows/docker.yml:205-208, the token cannot hold the workflows permission. GitHub refuses ref updates by app tokens that introduce changes under .github/workflows/ (including workspace-quarto-site.yml). Most releases touch these files, so the PATCH/POST will likely return 422 and fail the job after :latest has already moved. Fix: use a GitHub App or deploy-key token with workflow scope, or verify this path in a fork first. Also run the branch update before retagging the image so the two cannot diverge on failure.

P1 (should fix)

  • Unvalidated $newest and shallow checkout. At .github/workflows/docker.yml:196,204, git rev-list -n 1 "$newest" assumes newest is set in the prior step's shell and that tags exist locally. actions/checkout@v4 defaults to fetch-depth: 1 with no tags. Fix: resolve the commit via the API with sha=$(gh api "repos/$GITHUB_REPOSITORY/commits/$newest" --jq .sha), which also dereferences annotated tags. Add test -n "$newest" before writing it to GITHUB_ENV.
  • Broadened token scope. .github/workflows/docker.yml:165 grants contents: write to the whole job, including the buildx and third-party steps. Fix: move the branch update into a separate dependent job that holds only contents: write, and keep this job at contents: read.
  • Makefile and workflow resolve latest differently. In plugins/asta-tools/skills/workspace/assets/Makefile:43, latest maps to the highest vX.Y.Z tag via ls-remote. The workflow instead resolves the latest branch, which only moves after a successful docker release. During a release, or after a failed promotion, the render-time extension and the CI workflow/drift baselines come from different versions. This contradicts the "one version" claim. Fix: when ref = latest, fetch the archive for refs/heads/latest directly instead of computing the newest tag.
  • Mutable ref creates a supply-chain risk. At plugins/asta-tools/skills/workspace/assets/docs.yml:31, a mutable branch ref means any compromise of the asta-plugins release job, or a bad force-push, executes in every downstream project's CI with its Pages and contents permissions, with no review on their side. Fix: document this risk clearly in DEVELOPER.md, and consider keeping a pinned tag as the scaffold default with an automated bump PR.
  • No test for the new docs.yml parsing. The sed-based extraction at plugins/asta-tools/skills/workspace/assets/Makefile:9 has no coverage. It also captures trailing quotes (uses: '...@latest') and treats a commit SHA as a ref. Fix: add tests in tests/test_workspace_workflow.py for @latest, @vX.Y.Z, @main, a missing docs.yml and a quoted value, and strip "' in the sed expression.

P2 (nits)

  • Repeated sed invocations. plugins/asta-tools/skills/workspace/assets/Makefile:9 uses ?= with $(shell ...), which is recursively expanded, so sed reruns on every reference. Fix: use ASTA_PLUGINS_REF ?= $(eval ...) or assign the value once with := inside ifndef ASTA_PLUGINS_REF.
  • Misleading replacement count. At scripts/manage-version.py:262-263, faking replacements = 1 hides the actual state. Fix: branch explicitly with if get_workspace_workflow_version() == "latest": skip, and keep the strict count for pinned refs.
  • Unenforced documentation claim. plugins/asta-tools/skills/workspace/assets/docs.yml:26 and DEVELOPER.md:7 say the devcontainer image tag "should match", but nothing checks this. Fix: add a check, or soften the wording.
  • Error output hidden in the ref-existence check. At .github/workflows/docker.yml:205, >/dev/null 2>&1 treats auth or 5xx errors as "branch missing", which then produces a confusing POST failure. Fix: check specifically for a 404.

Recommendation: request-changes

@gas2own gas2own changed the title Workspace: one asta-plugins version per project, with a latest channel Align workspace workflow and assets on a release channel Oct 4, 2026
@gas2own

gas2own commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

Resolution of the latest independent review, on commit 6cf1966:

Finding Disposition
Bootstrap branch Already addressed: refs/heads/latest exists at v0.104.1. The release job now updates that existing ref only.
Ref update permissions and image drift GitHub's ref API lists contents: write, but the first release-job update remains untested. The ref job now runs before image retagging, so a rejected update stops without moving :latest images. The first final release must validate this path.
Tag availability and $newest handoff Checkout already used fetch-depth: 0 and fetched tags; the selected tag now passes as an explicit job output, and its commit must resolve before the ref is updated.
Broad write token Selection, ref update, and image retagging are separate jobs: contents: read plus packages: read; contents: write; and contents: read plus packages: write, respectively.
Different latest resolutions make workspace-assets now downloads refs/heads/latest, the same ref used by the workflow.
Mutable-ref risk Documented that @latest advances without a downstream PR and that projects needing approval should pin a release. This preserves the requested default.
Parser coverage Added cases for latest, a release tag, main, a commit SHA, quoted workflow values, and missing docs.yml, plus a local branch-archive fetch.
Repeated parsing The Makefile assigns the parsed ref once with :=.
Replacement count set_version now skips the ref rewrite explicitly for @latest; strict replacement counting remains for pinned refs.
Image consistency claim Docs now state that the devcontainer image is configured separately and may briefly differ during promotion.
Hidden ref-read errors The branch exists, so the update path now uses one PATCH call; API errors remain visible and stop the job.

Local validation: 33 workspace tests, Ruff lint and format checks, version consistency check, skill metadata validation, and release-step shell syntax passed. GitHub CI is running on 6cf1966. The first live final-release branch update remains the only validation gap.

@gas2own

gas2own commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Independent AI code review (Codex)

Automated review of the PR by a separately invoked Codex reviewer. Prioritised P0/P1/P2; treat as advisory input for the human reviewer, not a merge gate.

P0 (blocking)

  • .github/workflows/docker.yml:215: If the latest branch does not already exist, the first promotion fails when this lookup returns 404, so neither the branch nor the image tags are updated. Create refs/heads/latest at the selected release SHA on a missing-ref response, then use the comparison path for later releases. GitHub ref API.

P1 (should fix)

  • .github/workflows/docker.yml:190: newest is selected before the latest-ref concurrency lock. GitHub can replace a pending job even with cancel-in-progress: false, allowing a job with an older selection to replace the newer release’s job and leave latest stale. Recompute the highest complete release inside the serialized job. GitHub concurrency docs.

P2 (nits)

None.

Recommendation: request-changes

@gas2own

gas2own commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

Resolution of the latest AI review on commit 0a73dd8:

Finding Disposition
Missing latest branch Already handled. refs/heads/latest exists and points at the v0.104.1 commit. The scaffold's @latest ref resolves now; the branch update still needs its first live final-release run.
Release selected before concurrency lock Fixed. The serialized latest-ref job now selects the highest published final slim/TeX image pair after it starts, rather than using a candidate selected by an earlier job. A delayed job triggered by an older tag therefore sees a newer completed release. The image-retag job also fetches tags before resolving the branch.

Validation: the new test simulates an older tag run after a newer release is available and confirms it updates the branch to the newer commit. The two focused tests pass, Ruff lint and format checks pass, and the release workflow parses with valid shell syntax. I confirmed anonymous read access to the public GHCR image manifest, so the serialized ref job retains only contents: write. The first live release promotion remains the operational validation gap.

@gas2own

gas2own commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Independent AI code review (Claude)

Automated review of the PR by a separately invoked Claude reviewer. Prioritised P0/P1/P2; treat as advisory input for the human reviewer, not a merge gate.

P0 (blocking)

  • The workflow cannot create the latest branch on first run (.github/workflows/docker.yml:189-198).
    • Nothing creates refs/heads/latest. On the first release after merge, the gh api .../git/ref/heads/latest call returns 404, and set -e aborts the latest-ref job.
    • The PATCH .../git/refs/heads/latest call would also 404 on a missing ref.
    • Because latest needs latest-ref, the :latest image also stops advancing.
    • Meanwhile the scaffold (docs.yml:30) and the Makefile default already point at @latest / archive/refs/heads/latest.tar.gz. New projects therefore get a missing reusable workflow and a failing first fetch.
    • Fix:
      • Handle the 404 by calling POST repos/$GITHUB_REPOSITORY/git/refs with ref=refs/heads/latest and sha=$sha.
      • Allow an empty current only in that bootstrap case.
      • Create the branch out-of-band before merging the scaffold change, and note this in the PR.

P1 (should fix)

  • @latest is an unprotected mutable branch that now controls downstream CI by default (docs.yml:30, docker.yml:157-199).
    • Anyone with write access, or any workflow holding contents: write, can push to latest.
    • That push immediately changes the reusable workflow run in every scaffolded project. Those runs use the project's own Pages and token permissions.
    • Fix:
      • Add a repository ruleset restricting updates and force-pushes on latest to a dedicated release GitHub App.
      • Use that app's token for the PATCH instead of GITHUB_TOKEN, which cannot be a ruleset bypass actor.
      • Document the ruleset as a prerequisite.
  • The no-op path and first-run path are untested (tests/test_workspace_workflow.py, test_latest_ref_selects_newest_release_after_lock). The tests only cover a forward move. Fix: add cases for:
    • current == newest, asserting no PATCH is issued.
    • current > newest (a rerun of an older tag), asserting no backward move.
    • A missing branch (404) once bootstrap is implemented.
  • force=true hides non-linear history (docker.yml:198). It allows a non-fast-forward move, e.g. a patch tag cut from a maintenance branch. Semver ordering prevents regressions, but an unexpected history rewrite on the branch then passes silently. Fix: drop force=true unless off-main release branches are intended; otherwise log when the move is not a fast-forward.
  • Refs containing / are silently truncated (Makefile:9). The awk sub(/[^A-Za-z0-9._-].*$$/, "") turns @feature/x into feature, so the render fetches the wrong ref without any error. Fix:
    • Allow / in the character class and strip only quotes, whitespace, and # comments.
    • Or fail loudly when the extracted ref does not match the raw value.

P2 (nits)

  • set_version now crashes on a malformed scaffold (scripts/manage-version.py:254). get_workspace_workflow_version() raises an uncaught ValueError where the function previously printed an error and returned False. Fix: wrap the call in try/except and keep the red-error-plus-return False path.
  • The ref regex accepts suffixed refs (scripts/manage-version.py:101). @(latest|v[0-9.]+) also matches @latest-foo or @v1.2.3-rc.1 by prefix. Fix: append \b or (?=\s|$), and use v\d+\.\d+\.\d+.
  • Unused test environment variable (tests/test_workspace_workflow.py:226). GITHUB_REF_NAME is set but unused by the script under test. Fix: remove it.
  • Comment overstates the change (docker.yml:170). The comment says "inspect it without registry credentials", but docker/setup-buildx-action was removed and the job relies on the runner's preinstalled buildx. Fix: either restore setup-buildx-action or note the reliance on the preinstalled version.
  • Possible ambiguity with a latest tag (docs.yml:30). If a tag named latest is ever created, uses: ...@latest becomes ambiguous with the branch. Fix: add a tag ruleset blocking a latest tag.

Recommendation: request-changes

@gas2own

gas2own commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

Resolution of the latest independent review on commit a318065:

Finding Disposition
Missing latest branch Already addressed before this review: refs/heads/latest exists at the exact commit of v0.104.1. A missing branch would now fail closed rather than silently create a new release channel.
Unprotected mutable branch Valid residual risk of the requested floating @latest channel. The PR description and workspace developer guide disclose that downstream CI can change without a project PR and recommend a tag pin when review is required. A ruleset limited to a dedicated release App would need repository administration and a new credential; this PR does not introduce one.
No-op and backward-release tests Fixed: the release-step test now covers a forward move, an already-current branch, and an older available release that must not move the branch backward.
Forced branch rewrite Fixed: the ref update now uses force=false, so a non-fast-forward release fails before moving :latest images.
Slash-containing refs Fixed: the Makefile retains / in a workflow ref such as @feature/x; a test covers parsing it.
Malformed scaffold in set_version Fixed: the workflow ref is validated before any version file is written, and a malformed ref returns False with an error.
Suffixed refs accepted by version parser Fixed: the parser requires a complete @latest or @vX.Y.Z value. Tests reject suffixed and malformed versions.
Unused test environment variable Removed.
Registry comment Removed the unnecessary comment. The step still uses anonymous reads for the public package.
Ambiguous latest tag Valid residual risk: GitHub gives a same-named tag precedence over a branch in reusable workflow refs. No latest tag exists now. Preventing a future one requires repository policy; the documented tag-pin option remains available.

Local validation: 43 workspace workflow tests, Ruff lint and format, manage-version.py check, and git diff --check pass. GitHub checks on this commit are still running. The first live final-release branch update with GITHUB_TOKEN remains untested.

@gas2own

gas2own commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Independent AI code review (Codex)

Automated review of the PR by a separately invoked Codex reviewer. Prioritised P0/P1/P2; treat as advisory input for the human reviewer, not a merge gate.

P0 (blocking)

  • .github/workflows/docker.yml:188 — The first promotion fails if refs/heads/latest does not already exist: the ref lookup returns 404, so neither the branch nor the images advance. Create the branch at the selected release SHA when the lookup returns 404, then use the fast-forward check for later promotions.

P1 (should fix)

  • scripts/manage-version.py:263 — The reader accepts quoted or differently spaced pinned workflow refs, but set_version() only replaces an unquoted ref with one space after uses:. For those valid refs, it returns an error after updating other version files. Use the same ref pattern for validation and replacement, and validate the replacement before writing any files.

P2 (nits)

None.

Recommendation: request-changes

@gas2own

gas2own commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor Author

Resolution of the latest independent review on commit cec157e:

Finding Disposition
First latest promotion needs an existing branch Already satisfied: refs/heads/latest exists and points to the same commit as v0.104.1 (9766c028). The release job deliberately fails closed if that precreated branch disappears. The first live ref update with GITHUB_TOKEN remains untested.
Quoted or spaced pinned workflow refs fail during set_version Fixed in cec157e. The reader and updater now use the same match, and the updater replaces only the ref while preserving quotes, spacing, and comments. It validates the match before changing any version files.

Validation: nine focused version tests, Ruff lint and format, manage-version.py check, git diff --check, and all GitHub CI and image smoke checks pass.

@gas2own

gas2own commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Independent AI code review (Claude)

Automated review of the PR by a separately invoked Claude reviewer. Prioritised P0/P1/P2; treat as advisory input for the human reviewer, not a merge gate.

P0 (blocking)

  • .github/workflows/docker.yml:197: GITHUB_TOKEN likely cannot fast-forward latest across commits that change .github/workflows/*.
    • GitHub generally rejects ref updates that add or modify workflow files unless the token has the workflows permission, and GITHUB_TOKEN cannot be granted it.
    • Releases that touch workspace-quarto-site.yml, which is the point of this channel, would then fail to promote. latest and the :latest images would stay frozen.
    • Fix: confirm this against GitHub's behavior. If it fails, use a GitHub App or fine-grained PAT with contents and workflows write access in latest-ref. Add a release dry-run that exercises this path.

P1 (should fix)

  • .github/workflows/docker.yml:188: There is no bootstrap path. If heads/latest doesn't exist, gh api .../git/ref/heads/latest returns 404 and the job fails under set -e. The same happens if the branch points at a non-release commit. Nothing creates the branch.
    • Fix: on 404, POST repos/$GITHUB_REPOSITORY/git/refs with refs/heads/latest at $sha. Or document and script a one-time manual creation before merging.
  • plugins/asta-tools/skills/workspace/assets/docs.yml:30: The new default @latest makes every downstream project run whatever the latest branch points to, with the caller's permissions (pages and id-token). Anyone with push access to the repo can retarget it. The DEVELOPER.md caveat does not mitigate this.
    • Fix: add a ruleset or branch protection on latest: restrict updates to the release identity, block force-push and deletion, and require linear history.
    • Fix: reference that ruleset in the PR or repo config so it is enforced, not just documented.
  • plugins/asta-tools/skills/workspace/assets/Makefile:8-11: This silently changes behavior for existing projects. Their docs.yml still pins @v0.104.x, so render assets now freeze at that tag instead of tracking the newest release.
    • Fix: call out the migration in release notes. Optionally have workspace-assets warn when the resolved ref is a pinned tag older than latest.
  • .github/workflows/docker.yml:194-197: A newer final release that isn't a descendant of the current latest hard-fails the release. Examples are a hotfix cut from a maintenance branch, or latest sitting on a backport tag. The non-fast-forward PATCH fails, which is correct, but the error is opaque.
    • Fix: check git merge-base --is-ancestor "$current_sha" "$sha" first and emit an actionable error that names both tags.

P2 (nits)

  • plugins/asta-tools/skills/workspace/assets/Makefile:47-49: Non-latest branch refs like feature/x build archive/feature/x.tar.gz, which can be ambiguous with tags.
    • Fix: use archive/refs/tags/$ref.tar.gz for v* refs and archive/refs/heads/$ref.tar.gz for other non-SHA refs.
  • scripts/manage-version.py:44-49: The $ anchor with re.MULTILINE fails on CRLF docs.yml, reporting "Could not find workspace workflow ref".
    • Fix: allow an optional \r before $.
  • tests/test_workspace_workflow.py: Two tests duplicate the importlib loading of manage-version.py. Move it into a fixture.
  • plugins/asta-tools/skills/workspace/assets/DEVELOPER.md:7: This paragraph has grown long and mixes several topics: preview, channel policy, devcontainer, and offline behavior.
    • Fix: split the ref and channel policy into its own subsection.

Recommendation: request-changes

@gas2own

gas2own commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

Resolution of the latest independent review on 3da1670:

Finding Disposition
GITHUB_TOKEN cannot advance latest across workflow changes Tested with a CI GITHUB_TOKEN granted the same contents: write permission: a temporary job fast-forwarded a test ref from v0.104.1 to current main, crossing changes in five workflow files. The probe passed, and its temporary ref was deleted. This establishes the ref permission for this repository; the first actual release promotion is still untested. The probe job is absent from the final diff.
Missing branch bootstrap refs/heads/latest already exists at v0.104.1. The release job deliberately fails closed if it is removed or points at a non-release commit, rather than silently inventing a release channel.
Unprotected mutable @latest Valid open policy risk. The branch exists and is unprotected; the current repo ruleset does not cover it. The PR documents that @latest changes downstream CI without a project PR and offers @vX.Y.Z for approval-gated upgrades. Restricting this ref to a dedicated release identity requires repository administration and a new credential, so this remains a maintainer decision before merge.
Existing pinned projects now fetch pinned assets Intended: the workflow and evidence extension follow one ref. The workspace developer guide now states the migration effect explicitly.
Opaque non-fast-forward failure Fixed: promotion names the current and requested release and explains how to cut a descendant release; the API still requires a fast-forward.
Branch or tag archive ambiguity Fixed: evidence fetches use explicit refs/heads/ or refs/tags/ URLs. A 40-character commit SHA keeps its direct archive URL. Tests cover all three forms and an rc tag.
CRLF workflow file Fixed: the version reader accepts CRLF.
Duplicate test loading Advisory cleanup; no behavior change needed.
Long developer-guide paragraph Split into preview and workspace-version sections.

Validation: 50 workspace workflow tests, Ruff lint and format, version consistency, and git diff --check pass locally. The final GitHub checks and the paired skills eval are running. No release tag or latest image was moved.

@gas2own

gas2own commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

Paired workspace bootstrap eval on workspace-single-version: baseline score 0.5, PR score 0.5 over three epochs. Both arms passed no_feature_branch_on_empty_remote in all three epochs and failed checked_remote_for_main in all three. This is no measured regression in the one available bootstrap case; it does not test the latest branch, release promotion, image alignment, or the security of a mutable reusable-workflow ref.

The PR's CI and image smoke checks pass on 3da1670. The first final-release promotion remains a live validation item. The unprotected latest default is still a policy choice before merge; the eval does not settle it.

The latest-ref job now runs in the 'release' environment and pushes the
branch over SSH with LATEST_DEPLOY_KEY, so a ruleset on refs/heads/latest
can block every other writer and workflow token.

Suggested-by: @jbragg
@gas2own

gas2own commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

Commit 24957b6 makes latest updatable only by a release-tag run: the latest-ref job now runs in a release environment and pushes the branch over SSH with LATEST_DEPLOY_KEY instead of GITHUB_TOKEN (job permissions drop to contents: read). The job fails closed until the secret exists. The latest-ref tests pass locally against a real git remote; ruff is clean.

Admin setup this relies on:

  1. ssh-keygen -t ed25519 -N '' -f latest_deploy_key -C asta-plugins-latest
  2. Settings → Deploy keys → add latest_deploy_key.pub with Allow write access.
  3. Settings → Environments → new release; Deployment branches and tags → selected → tag rule v*; environment secret LATEST_DEPLOY_KEY = the private key. Then delete the local key files.
  4. Settings → Rules → new branch ruleset targeting latest, Active: restrict updates, restrict deletions, block force pushes; bypass list: Deploy keys only.
  5. New tag ruleset targeting v*, Active: restrict creations, updates, deletions; bypass: Repository admin (and Maintain if wanted). Without this, any writer could push a v* tag whose workflow reads the environment secret.

Suggested-by: @jbragg

@gas2own

gas2own commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor Author

Closed as a stale implementation after the 0.105–0.109 releases. The branch conflicts with current main in the workspace skill, guide and workflow stub, and its copied-Makefile implementation predates the managed workspace CLI. Current workspaces select their workflow and managed assets through the released loader.

PR 201 builds its example directly from each release’s checkout and published TeX image, removing the example’s need for a floating workflow channel. It does not implement automatic advancement/protection of the latest Git branch or change other workspaces’ default channel. Those remaining requirements are retained as separate follow-up work, to adapt to the current loader and release pipeline with administrator-owned protection and credentials.

Correction to the earlier closure rationale: this branch retains a job named latest, so its job rename alone would not break PR 201’s needs: latest dependency.

Suggested-by: @jbragg

@gas2own gas2own closed this Oct 12, 2026
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