Skip to content

fix(version): exclude draft GitHub releases from Version Tracker resolution - #2900

Merged
Andriy Knysh (aknysh) merged 13 commits into
mainfrom
osterman/version-track-github-drafts
Aug 11, 2026
Merged

Andriy Knysh (aknysh) merged 13 commits into
mainfrom
osterman/version-track-github-drafts

Conversation

@osterman

@osterman Erik Osterman (Cloud Posse) (osterman) commented Aug 7, 2026 •

Copy link
Copy Markdown
Member

what

  • pkg/github.GetReleases now excludes draft GitHub releases unconditionally, alongside the existing prerelease filter. This fixes the Version Tracker's github-releases datasource resolver, atmos version list, and GetReleaseVersions, which all share this function.
  • Removes the deprecated atmos version track render subcommand. It was marked Deprecated/Hidden in the same commit that introduced it and has never had a non-deprecated existence in any release, so no migration path is needed. The shared renderTemplate helper moves into apply.go, its only remaining consumer.
  • Fixes pre-existing EditorConfig indentation drift (3-space list/fence indents instead of the required 2-space multiple) in docs/prd/atmos-version-management.md, surfaced once the file was touched by this branch's --affected validation.
  • Expands the version.files and !version function docs with worked before/after examples for the marker and github-actions file managers (including SHA pinning) and adds Helm/Container-component examples alongside the existing Terraform one.

why

  • atmos version track with datasource: github-releases and desired: latest could resolve to an unpublished draft release instead of the actual latest published release, whenever the GitHub token had repo write access (e.g. secrets.GITHUB_TOKEN in a repo's own CI). Reproduced against cloudposse/atmos itself: atmos version track lock resolved to v1.226.0, which gh release view v1.226.0 --repo cloudposse/atmos --json isDraft confirmed was a draft, when the real latest published release was v1.225.0. Unlike prerelease, there's no legitimate case for ever resolving to a draft, so it's excluded unconditionally rather than gated behind a new opt-in policy field.
  • atmos version track render was superseded by apply/the file-managers architecture within its own introducing PR and has been carried as dead weight across multiple releases; removing it avoids maintaining a command with no live users.
  • The docs updates make the Version Tracker's file-manager and !version behavior easier to learn from concrete examples rather than a single terse case.

references

  • N/A

…lution

github-releases datasource resolution could pick an unpublished draft
release instead of the latest published one when the GitHub token had
repo write access (e.g. secrets.GITHUB_TOKEN in CI). GetReleases now
filters out drafts unconditionally, alongside the existing prerelease
filter, fixing the Version Tracker resolver, `atmos version list`, and
GetReleaseVersions at the shared root cause.
render.go and apply.go were added in the same commit that introduced
the Version Tracker (#2664); render was marked Deprecated/Hidden from
day one and has never had a non-deprecated existence in any release,
so it never needs a migration path. Relocates the shared renderTemplate
helper into apply.go (its only remaining consumer) and removes the
now-dead manager.RenderFile helper and render-specific sentinel errors.

Also fixes pre-existing EditorConfig indentation drift in
docs/prd/atmos-version-management.md (3-space list/fence indents under
numbered items instead of the required 2-space multiple), surfaced by
this branch's `--affected` validation once the file was touched.
Adds worked before/after examples for the marker and github-actions
file managers (including SHA pinning) to the version.files reference,
and adds Helm/Container-component tabs to the !version function docs
alongside the existing Terraform example, so each supported component
type has a concrete resolution example rather than relying solely on
the Terraform case.
@atmos-pro

atmos-pro Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Tip

Atmos Pro  

No affected stacks workflow was detected for this pull request.
If this is expected, no action is needed.
Learn More. Ask AI.

@osterman Erik Osterman (Cloud Posse) (osterman) added the patch A minor, backward compatible change label Aug 7, 2026
@github-actions github-actions Bot added the size/m Medium size PR label Aug 7, 2026
@github-actions

github-actions Bot commented Aug 7, 2026 •

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues found.

Scanned Files

None

@coderabbitai

coderabbitai Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The change removes the deprecated version render command, moves template rendering into track apply, excludes draft GitHub releases from resolution, and updates version-management documentation and test isolation.

Changes

Version render command cleanup

Layer / File(s) Summary
Move template rendering to apply
cmd/version/track/apply.go, pkg/version/manager/context.go, cmd/version/track/render.go
renderTemplate now processes templates through Atmos. The deprecated render command and RenderFile helper are removed.
Remove obsolete render contracts and tests
cmd/version/track/track.go, errors/errors.go, cmd/version/track/track_test.go, docs/fixes/2026-08-06-version-track-remove-render-command.md
Render-specific errors, command helpers, and check-mode tests are removed. The cleanup is documented.

Draft release filtering

Layer / File(s) Summary
Filter draft GitHub releases
pkg/github/releases.go, pkg/github/releases_test.go
GetReleases removes draft releases before date filtering and pagination. Tests verify filtering, order preservation, and empty inputs.
Record the resolution rule
docs/prd/atmos-version-management.md, docs/fixes/2026-08-06-version-tracker-github-releases-draft-exclusion.md
The requirements and fix document state that draft releases are excluded regardless of prerelease settings.

Version-management documentation

Layer / File(s) Summary
Document version file markers and workflows
website/docs/cli/configuration/version/files.mdx
The documentation adds Dockerfile marker examples and GitHub Actions workflow examples, including tag updates and immutable SHA pinning.
Document YAML version resolution
website/docs/functions/yaml/version.mdx
The documentation adds Terraform, Helm, and container examples. It distinguishes whole-value !version resolution from embedded {{ .version.name }} interpolation.
Normalize version-management documentation
docs/prd/atmos-version-management.md
Related lists and CI code blocks use normalized Markdown indentation.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

  • cloudposse/atmos#2698: Both changes affect version track command behavior in cmd/version/track/track.go.
  • cloudposse/atmos#2844: The documentation changes may share Vale-based writing and documentation linting work.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
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 primary change: excluding draft GitHub releases from Version Tracker resolution.
Docstring Coverage ✅ Passed Docstring coverage is 88.89% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch osterman/version-track-github-drafts

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

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot 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.

🧹 Nitpick comments (1)
pkg/github/releases_test.go (1)

623-630: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Assert exact release values and order.

assert.Len and assert.False do not verify which releases were returned or whether input order was preserved. Add expected tag values to each table case and compare them by index.

As per coding guidelines, slice results must assert element values rather than only length.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/github/releases_test.go` around lines 623 - 630, Add expected tag values
to each table-driven case in the filterDrafts tests, then replace the
length-only validation with indexed assertions comparing each result’s tag to
the expected tag at the same position. Preserve the existing non-draft assertion
and verify the returned order matches the input order.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@pkg/github/releases_test.go`:
- Around line 623-630: Add expected tag values to each table-driven case in the
filterDrafts tests, then replace the length-only validation with indexed
assertions comparing each result’s tag to the expected tag at the same position.
Preserve the existing non-draft assertion and verify the returned order matches
the input order.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 95e22826-2ed3-47f7-8002-c69e715c571f

📥 Commits

Reviewing files that changed from the base of the PR and between 3ce4349 and 27fd628.

📒 Files selected for processing (13)
  • cmd/version/track/apply.go
  • cmd/version/track/render.go
  • cmd/version/track/track.go
  • cmd/version/track/track_test.go
  • docs/fixes/2026-08-06-version-track-remove-render-command.md
  • docs/fixes/2026-08-06-version-tracker-github-releases-draft-exclusion.md
  • docs/prd/atmos-version-management.md
  • errors/errors.go
  • pkg/github/releases.go
  • pkg/github/releases_test.go
  • pkg/version/manager/context.go
  • website/docs/cli/configuration/version/files.mdx
  • website/docs/functions/yaml/version.mdx
💤 Files with no reviewable changes (4)
  • errors/errors.go
  • cmd/version/track/render.go
  • pkg/version/manager/context.go
  • cmd/version/track/track_test.go

coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 7, 2026
@codecov

codecov Bot commented Aug 7, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.71429% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.81%. Comparing base (a0b36ba) to head (558b1d4).

Files with missing lines Patch % Lines
cmd/version/track/apply.go 0.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2900      +/-   ##
==========================================
+ Coverage   82.80%   82.81%   +0.01%     
==========================================
  Files        1867     1866       -1     
  Lines      181308   181277      -31     
==========================================
- Hits       150140   150133       -7     
+ Misses      23352    23329      -23     
+ Partials     7816     7815       -1     
Flag Coverage Δ
unittests 82.81% <85.71%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
cmd/version/track/track.go 92.85% <ø> (ø)
errors/errors.go 100.00% <ø> (ø)
pkg/github/releases.go 70.39% <100.00%> (+2.08%) ⬆️
pkg/version/manager/context.go 100.00% <ø> (+15.38%) ⬆️
cmd/version/track/apply.go 25.00% <0.00%> (-1.67%) ⬇️

... and 7 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Length-only assertions let filterDrafts silently drop or reorder the
wrong releases; assert each result's tag against the expected order.
- Replace before/after tabs in files.mdx with one tab per distinct
  scenario (single tool, multiple tools, YAML, custom match pattern,
  version bump, pinned to SHA), and show both trailing and standalone
  marker comment forms for the match= example.
- Use current tool versions in examples instead of stale ones.
- Rename the "Non-Dockerfile Format" tab to "YAML" to name what the
  example is instead of what it isn't.
- Clarify in version.mdx that !version only resolves inside stack
  manifests, not in atmos.yaml or arbitrary YAML files.
@osterman

Copy link
Copy Markdown
Member Author

CodeRabbit (@coderabbitai) full review

@coderabbitai

coderabbitai Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

🧹 Nitpick comments (1)
pkg/github/releases_test.go (1)

582-635: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Cover the public GetReleases pipeline.

These cases validate filterDrafts, but they do not prove that GetReleases invokes it before applyPagination. If existing mock-server tests do not already cover this path, extend one with a newer draft, a published release, and Limit=1; assert that the published release is returned.

As per coding guidelines, new features must include comprehensive unit tests and integration tests when possible.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/github/releases_test.go` around lines 582 - 635, The tests currently
cover filterDrafts directly but not the public GetReleases pipeline or its
filtering-before-pagination order. Extend an existing mock-server GetReleases
test, or add one if needed, with a newer draft and a published release, set
Limit=1, and assert the published release is returned, proving GetReleases
filters drafts before applyPagination.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/fixes/2026-08-06-version-tracker-github-releases-draft-exclusion.md`:
- Around line 17-19: Update the permission statement in the version-tracker
explanation to clarify that repository CI reproduces the issue only when its
GITHUB_TOKEN has sufficient repository permissions to view draft releases,
rather than implying every repository token has that access.

In `@website/docs/cli/configuration/version/files.mdx`:
- Line 188: Update the actions/checkout entry in the documented configuration
example to use the SHA from the v6 lock entry, and ensure its trailing version
comment remains v6.1.0 so the pinned revision matches the documented desired
major version.

---

Nitpick comments:
In `@pkg/github/releases_test.go`:
- Around line 582-635: The tests currently cover filterDrafts directly but not
the public GetReleases pipeline or its filtering-before-pagination order. Extend
an existing mock-server GetReleases test, or add one if needed, with a newer
draft and a published release, set Limit=1, and assert the published release is
returned, proving GetReleases filters drafts before applyPagination.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a0a3b057-0e7c-440c-8e05-61e2753a3549

📥 Commits

Reviewing files that changed from the base of the PR and between 3ce4349 and d66f782.

📒 Files selected for processing (13)
  • cmd/version/track/apply.go
  • cmd/version/track/render.go
  • cmd/version/track/track.go
  • cmd/version/track/track_test.go
  • docs/fixes/2026-08-06-version-track-remove-render-command.md
  • docs/fixes/2026-08-06-version-tracker-github-releases-draft-exclusion.md
  • docs/prd/atmos-version-management.md
  • errors/errors.go
  • pkg/github/releases.go
  • pkg/github/releases_test.go
  • pkg/version/manager/context.go
  • website/docs/cli/configuration/version/files.mdx
  • website/docs/functions/yaml/version.mdx
💤 Files with no reviewable changes (4)
  • cmd/version/track/render.go
  • errors/errors.go
  • pkg/version/manager/context.go
  • cmd/version/track/track_test.go

- Qualify the GITHUB_TOKEN permission claim in the draft-exclusion
  fix log: repo CI only sees drafts when its token permissions grant
  read access to contents, not unconditionally.
- Fix the pinned-SHA example in files.mdx: the SHA labeled v6.1.0 was
  actually actions/checkout's v5.0.0 release commit. Swapped in the
  correct SHA for the v6.1.0 tag.
coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 7, 2026
Bump pnpm overrides to patched versions, all within their existing
major line (not blocked by dependabot.yml's semver-major ignore):

- js-yaml 3.15.0 -> 3.15.1 (GHSA-5p4m-2wfm-xmqj, high)
- js-yaml 4.3.0 -> 4.3.1 (high)
- mermaid 11.16.0 -> 11.16.1 (4 advisories: 1 low, 3 moderate)
coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 7, 2026
…er log

Windows acceptance tests timed out at exactly the 60m step budget
(started 19:04:21, `go test` itself finished 20:03:56 with every
package printing `ok`, endgroup at 20:04:21, force-cancelled 17s
later at 20:04:38). No test failure -- just CI-to-CI variance on a
budget with no headroom, the same flake pattern already documented
here from an earlier 45m->60m bump.

Give windows-latest its own 80m step budget (matrix-conditional
expression; macOS stays at 60m, where it comfortably finishes in
~35m today) and raise the job-level ceiling from 120m to 140m to
preserve the same headroom-above-step-budget-sum margin the existing
comment establishes for Linux and macOS.
@mergify

mergify Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Important

Cloud Posse Engineering Team Review Required

This pull request modifies files that require Cloud Posse's review. Please be patient, and a core maintainer will review your changes.

To expedite this process, reach out to us on Slack in the #pr-reviews channel.

@aknysh
Andriy Knysh (aknysh) added this pull request to the merge queue Aug 10, 2026
zack-is-cool pushed a commit to zack-is-cool/atmos that referenced this pull request Aug 10, 2026
…udposse#2880)

* fix(steps): resolve relative paths against step.WorkingDirectory

The archive, file, workdir, junit, and container build step handlers
resolved relative source/destination/path/glob/context fields via
template substitution only, then let filesystem calls resolve them
against the Atmos process's own cwd instead of step.WorkingDirectory.
This surfaced most visibly for `type: archive` hooks, since the hooks
engine correctly defaults working_directory to the component path but
the handler never read it back.

Add a shared BaseHandler.ResolveInWorkingDirectory helper that anchors
a relative resolved value to step.WorkingDirectory (falling back to
process cwd when unset, matching prior behavior), and apply it across
the five affected handlers. container_build.go additionally anchors
Dockerfile to the resolved Context rather than WorkingDirectory
directly, matching Docker's own convention.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* docs(fixes): add fix record for step WorkingDirectory bug

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* test(runner/step): close coverage gaps in ResolveInWorkingDirectory and loadReport

Codecov flagged handler_base.go and junit.go below the 85% patch-coverage
threshold. Add a case that exercises the relative (non-template)
WorkingDirectory branch in resolveWorkingDirectory, and a junit test that
triggers a WorkingDirectory template-resolution error from inside
loadReport's per-pattern loop, distinct from the already-covered `files`
template error path.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* fix(steps): anchor container bake/cache paths and preserve workflow error context

A field test of the WorkingDirectory fix found the container_build.go handler
was only partially fixed: build.bake.file/bake.files and cache.from/cache.to
type: local src/dest still resolved against the Atmos process's own cwd
instead of step.WorkingDirectory, reproduced live as a silent build against
the wrong bake file. Both now route through ResolveInWorkingDirectory like
context/dockerfile already do.

Also root-caused and fixed a separate defect surfaced while verifying error
output: buildWorkflowStepError dual-wrapped step errors with fmt.Errorf before
building the final error, and cockroachdb/errors treats that Go 1.20
multi-error shape as an opaque leaf node, silently dropping any hints/context
a handler attached deeper in the chain. Switched to WithCause, which extracts
them eagerly.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* fix(steps): anchor container bake/cache paths and preserve workflow error context

Address CodeRabbit findings on PR cloudposse#2880:
- Remove the host-specific /tmp/atmos-field-test/ path from the fix doc,
  replacing it with a worktree-relative fixture reference.
- Split TestBuildWorkflowStepError and TestBuildWorkflowStepErrorPreservesInnerHintsAndContext
  out of workflow_utils_test.go into a focused workflow_step_error_test.go,
  keeping step-error tests co-located and out of the oversized (pre-existing)
  workflow_utils_test.go file.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* test(runner/step): close container_build.go coverage gaps from bake/cache anchoring

Codecov flagged container_build.go's patch coverage below 85% after the
bake/cache anchoring follow-up. Add regression tests for the three
previously-uncovered error branches: resolveBakeFiles propagating a
per-entry template failure, anchorCacheLocalPaths' own resolve failure, and
that failure propagating out through resolveBuildCache. handler_base.go's
remaining gap (os.Getwd/filepath.Abs failing inside resolveWorkingDirectory)
is left uncovered deliberately -- it requires corrupting the process's own
working directory to reach, has no DI seam, and matches this repo's existing
untested pattern for the identical os.Getwd/filepath.Abs fallback in
container_run.go.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* fix(docs): exclude reproducible-builds.org from link checking (CI connection refused)

CI's Check Markdown Links job failed on docs/prd/archive-step.md's citation
of the SOURCE_DATE_EPOCH origin -- the CI runner's outbound request was
refused while the page returns 200 OK outside CI. Follows the repo's
existing precedent for excluding CI-hostile hosts (docs.docker.com,
otelic.com, taskfile.dev, etc.) in lychee.toml.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* feat(hooks): anchor bare-relative working_directory to the component

An explicit working_directory: on a kind: step/kind: steps hook was always
resolved against the Atmos process's own cwd, regardless of shape. Following
docs/prd/base-path-resolution-semantics.md's existing Dot/Bare convention: a
dot-prefixed value (., .., ./x, ../x) keeps resolving against the process
cwd; a bare relative value (x, x/y) now resolves against the component's
own working directory instead -- the same directory ComponentPath(ctx)
already computes for the unset-default case, so this stays compatible with
provisioned working directories and metadata.component aliasing for free.
Workflows and custom commands are unaffected -- they have no "current
component" concept, so bare-relative values there still resolve against the
process cwd exactly as before.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* fix(security): remediate 7 open Dependabot alerts

Bump pnpm.overrides floors for transitive npm dependencies flagged by
Dependabot (all patch/minor bumps within the same major, not blocked by
dependabot.yml's major-version ignore policy):

- js-yaml 3.15.0 -> 3.15.1 (cloudposse#269, GHSA-5p4m-2wfm-xmqj: quadratic CPU
  consumption in !!omap resolution, high)
- js-yaml 4.3.0 -> 4.3.1 (cloudposse#268, same advisory, 4.x line, high)
- mermaid 11.16.0 -> 11.16.1 (cloudposse#267, cloudposse#266, cloudposse#265, cloudposse#264, cloudposse#263: five advisories
  ranging low-medium)

NOTICE unchanged (no license changes). Verified: pnpm install regenerated
website/pnpm-lock.yaml with the bumped versions resolved, atmos fix lint
(patch-scoped, no Go files touched) is a no-op, and cd website && npm run
build succeeds with no new broken links.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* docs(fixes): fix markdownlint MD018 in working-directory fix record

Address CodeRabbit finding on PR cloudposse#2880: a paragraph wrap left "cloudposse#2880):" at
the start of a line, which markdownlint's atx-heading rule (MD018) flags as
a heading missing a space after the hash. Rewrap so the line doesn't start
with a bare hash-prefixed token.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* fix(runner/step): close remaining working_directory anchoring gaps

Found by field-testing the working_directory fix against real hooks,
workflows, and a live docker build instead of just unit tests:

- workdir step: `source` (local relative path) now anchors to
  `working_directory` via a new `sourceprov.WithBaseDir` option,
  matching `path`'s existing anchoring instead of silently falling
  back to the process cwd.
- workflow-level `working_directory:` default now reaches extended
  step types (archive/file/junit/workdir/container), not just
  shell/exec/atmos steps, which silently ignored it before.
- step-level `working_directory` now expands a leading `~`, matching
  the tilde expansion --chdir already gets.
- Corrected agent-skills/atmos-steps and the workflow/hooks docs,
  which claimed a single blanket CWD-vs-base_path rule that doesn't
  match actual per-surface behavior.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* docs(steps): document handler-field and unset-hook working_directory contracts

Addresses CodeRabbit feedback on PR cloudposse#2880: state that relative handler
fields (source, destination, path, files, context) resolve against the
already-resolved working_directory, that a container Dockerfile
resolves relative to context rather than working_directory directly,
and that an unset kind: step hook working_directory (not just a bare
value) anchors to the component's own working directory.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* fix(runner/step): isolate CI base-resolution test from ambient GITHUB_EVENT_PATH

TestSetDescribeAffectedFlagValueInCliArgs_BaseResolution's merge_group
subtest only overrode GITHUB_ACTIONS/GITHUB_EVENT_NAME/GITHUB_BASE_REF,
so it depended on $GITHUB_EVENT_PATH being unset in the ambient
environment. That's true for local/regular CI runs, but not when the
test itself runs inside a real GitHub Actions merge_group job (i.e.
the merge queue): the real event payload's merge_group.base_sha then
takes precedence over the simulated GITHUB_BASE_REF, resolving to a
SHA instead of the "refs/remotes/origin/main" ref the test asserts.

This was failing the merge queue for this PR and, independently, for
cloudposse#2900 and cloudposse#2903 as well -- confirmed pre-existing and unrelated to any
of their changes. Fixed by explicitly forcing GITHUB_EVENT_PATH="" so
the subtest deterministically exercises the fallback path it's meant
to test, regardless of the real job's event context.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* fix(security): remediate 5 of 7 open Dependabot alerts

- github.com/go-git/go-git/v5: v5.19.1 -> v5.19.2, fixing GHSA-hc8v-wwc9-vgxm
  (symlink traversal in worktree operations) and the companion malicious
  reference-name advisory (cloudposse#270, cloudposse#271). Patch-level bump, no API changes.
- website: dompurify pnpm override ^3.4.12 -> ^3.4.13, fixing an IN_PLACE
  hook removal XSS (cloudposse#272).
- website: nanoid pnpm overrides bumped to ^3.3.17 (added a second
  selector, nanoid@^3.3.16, to also catch postcss's own nanoid range,
  which the existing [email protected] selector didn't match), fixing two
  indefinite-loop DoS advisories (cloudposse#273, cloudposse#274). The nanoid 5.x line was
  already patched by the existing override.
- NOTICE regenerated for the go-git/dompurify/nanoid version bumps.

Not fixed: image-size (cloudposse#275, cloudposse#276, both DoS via infinite loop) has no
patched release yet as of this commit -- GitHub's advisories list
"<= 2.0.2" as vulnerable with no first_patched_version. Left as-is
pending an upstream fix.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

---------

Co-authored-by: Claude Sonnet 5 <[email protected]>
Co-authored-by: Andriy Knysh <[email protected]>
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Aug 10, 2026
@mergify

mergify Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

💥 This pull request now has conflicts. Could you fix it Erik Osterman (Cloud Posse) (@osterman)? 🙏

@mergify mergify Bot added the conflict This PR has conflicts label Aug 10, 2026
…k-github-drafts

# Conflicts:
#	website/package.json
#	website/pnpm-lock.yaml
@aknysh
Andriy Knysh (aknysh) added this pull request to the merge queue Aug 11, 2026
@atmos-pro

atmos-pro Bot commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Tip

Atmos Pro  

No affected stacks workflow was detected for this pull request.
If this is expected, no action is needed.
Learn More. Ask AI.

Merged via the queue into main with commit 21c5899 Aug 11, 2026
95 checks passed
@aknysh
Andriy Knysh (aknysh) deleted the osterman/version-track-github-drafts branch August 11, 2026 01:43
@atmos-pro

atmos-pro Bot commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Tip

Atmos Pro  

No affected stacks workflow was detected for this pull request.
If this is expected, no action is needed.
Learn More. Ask AI.

@mergify mergify Bot removed the needs-cloudposse Needs Cloud Posse assistance label Aug 11, 2026
@github-actions

Copy link
Copy Markdown

These changes were released in v1.226.0-rc.5.

This branch was successfully deployed

1 active and 1 inactive deployments
preview — 558b1d45 Deployed Aug 10, 2026 by github-actions[bot]
screengrabs — 558b1d45 Deployed Aug 10, 2026 by osterman via build #1280
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

patch A minor, backward compatible change size/m Medium size PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants