Skip to content

ci: fix post-publish smoke test and refresh-baselines auth#366

Merged
chadjw merged 1 commit into
mainfrom
fix/post-merge-workflow-failures
May 20, 2026
Merged

ci: fix post-publish smoke test and refresh-baselines auth#366
chadjw merged 1 commit into
mainfrom
fix/post-merge-workflow-failures

Conversation

@chadjw
Copy link
Copy Markdown
Contributor

@chadjw chadjw commented May 20, 2026

Two pre-existing workflow failures, both consistently breaking every merge to main since at least 2026-05-18 (six failed Post-Publish Smoke Test runs in a row, and the refresh-baselines job has failed on the last several main merges including #363 and #365). Neither was introduced by a recent PR — they're workflow bugs.

Summary

1. Post-Publish Smoke Test (.github/workflows/smoke-test.yml)

  • Was importing every published package by bare specifier in a loop. @harness-engineering/dashboard publishes only ./server and ./package.json subpath exports — it's a runnable server with no library API and a side-effectful entrypoint — so the bare import fails with No "exports" main defined.
  • Switched dashboard to probe via @harness-engineering/dashboard/package.json instead. Other packages keep the bare-specifier import. npm install still resolves dashboard's transitive deps, so incident fix(types): republish types so downstream dist matches published exports #332-style cross-package drift would still surface there.

2. refresh-baselines (.github/workflows/ci.yml)

  • Had permissions: contents: write only. Branch protection blocks direct pushes to main, so the workflow falls back to gh pr create — which fails with Resource not accessible by integration because the token lacks pull-requests: write. Result: the merge run is marked failed even when the baseline diff was empty.
  • Added pull-requests: write to the job's permissions. Comment in the workflow explains the contract.

Test plan

  • YAML validity: python3 -c "import yaml; yaml.safe_load(...)" parses both files.
  • JSON-with-import-attributes syntax (with: { type: 'json' }) verified to work on Node 22+ locally (the smoke runner is pinned to Node 22).
  • On merge: confirm Post-Publish Smoke Test passes end-to-end.
  • On merge: confirm refresh-baselines either commits cleanly or successfully opens a baseline-refresh PR.

Out of scope

  • Dashboard's published shape (no . export) is intentional; this PR adapts the test, not the package.
  • The pre-existing arch baseline regressions in packages/cli (handleEmitSkillProposal complexity, module-size, dependency-depth) are unrelated.

Two pre-existing workflow failures, both consistently breaking every
merge to main:

1. Post-Publish Smoke Test was importing `@harness-engineering/dashboard`
   by bare specifier. Dashboard publishes no '.' export — it's a
   runnable server with side-effectful entrypoint and no library API —
   so Node rejected the bare import with `No "exports" main defined`.
   Probe `@harness-engineering/dashboard/package.json` instead; npm
   install still resolves dashboard's transitive deps, so incident
   #332-style cross-package drift would still surface there.

2. The `refresh-baselines` job had `contents: write` only. Branch
   protection now blocks direct pushes to main, so the workflow falls
   back to `gh pr create`, which fails with "Resource not accessible by
   integration" without `pull-requests: write`. Add the permission.
@chadjw chadjw merged commit 27e89e3 into main May 20, 2026
11 of 12 checks passed
@chadjw chadjw deleted the fix/post-merge-workflow-failures branch May 20, 2026 18:49
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