fix(ci): restore refactor workflow parity through shared automation - #2006
fix(ci): restore refactor workflow parity through shared automation#2006aidandaly24 wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## refactor #2006 +/- ##
=========================================
Coverage 97.01% 97.01%
=========================================
Files 368 368
Lines 21630 21630
=========================================
Hits 20984 20984
Misses 646 646 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| - **Excessive mocking** - Avoid excessive mocking; it couples tests to implementation details, provides weaker | ||
| guarantees, and often points to mismanaged dependencies. Prefer real dependencies (e.g. temp directories over fs | ||
| mocks) and only mock at true I/O boundaries (e.g. network calls, AWS SDK clients, HTTP requests). | ||
| - **Missing telemetry** - New features should include telemetry instrumentation. See `src/cli/telemetry/README.md` for |
There was a problem hiding this comment.
we might want to remove this, since its non-existent on this branch.
|
|
||
| ## Testing with a bundled distribution | ||
|
|
||
| Run `npm run bundle` in `agentcore-cli/` to create a tar distribution that includes the packaged |
There was a problem hiding this comment.
this is no longer true right? I imagine we'll have a new bun command at some point?
There was a problem hiding this comment.
Will remove this
| branches: | ||
| - main | ||
| - refactor | ||
| - feat/summit_release |
There was a problem hiding this comment.
I think this one can be dropped.
| @@ -0,0 +1,21 @@ | |||
| # Runs static quality and safety checks independently from build and test. | |||
| name: Quality and Safety Checks | |||
There was a problem hiding this comment.
whats the advantage of moving this into its own workflow vs a job that's part of CI?
There was a problem hiding this comment.
There is not a strong advantage. I split it out to match the workflow shape on main, but check.yml already composes cleanly into CI. I’m going to move it back under ci.yml but I'll keep the added Secretlint coverage.
| @@ -0,0 +1,28 @@ | |||
| name: AgentCore Harness Reviewing | |||
There was a problem hiding this comment.
does it make sense to unify some of these workflows, and run them as jobs behind a single one for the pull_request_target event? All these new files appear to have the same/similar trigger and permissions.
There was a problem hiding this comment.
Yes, that makes sense. I’ll consolidate these into one local pr-automation.yml with a union pull_request_target trigger and then we cna have separate conditionally gated jobs calling the shared workflows.
|
|
||
| ```bash | ||
| finch build \ | ||
| --build-arg CLONE_TOKEN=<pat-for-cloning> \ |
There was a problem hiding this comment.
q: do we know what token is this? Do we want to migrate the harness reviewer to use the bot credentials?
There was a problem hiding this comment.
This is the automatic per-run ${{ github.token }}, not a stored PAT. It is repository-scoped, expires after the run, and posts as github-actions[bot]. I chose it because this removes the stale baked credential without introducing another secret lifecycle.
We could go with the bot credentials through the GitHub App token per run. I agree this is probably better since we have the GH app we may as well use it. I'll update to that and we can always switch to this in the future.
| branches: [main, refactor] | ||
| pull_request: | ||
| branches: [main, refactor, "feat/**"] | ||
| pull_request_target: |
There was a problem hiding this comment.
does this run the workflow twice on PRs (once on the upstream and once on the fork)?
There was a problem hiding this comment.
Yes, good catch. Both events can fire for the same PR, because pull_request_target checks out the trusted base by default rather than the PR head. I’m removing pull_request_target and keeping push plus pull_request.
Description
Restore workflow parity on
refactorwhile keeping reusable mechanics inaws/agentcore-devx-devtools.pr-automation.ymlrefactorthat the restored formatting check rejectsHarness invocation/publishing and Security branch authorization come from
aws/agentcore-devx-devtools#2. Current default-branch trigger coverage comesfrom
aws/agentcore-cli#2005.Related Issue
N/A - workflow parity for the unreleased
refactorbranch.Documentation PR
N/A
Type of Change
Testing
How have you tested the change?
bun testcompleted with 1,411 passing tests; seven process-control failures and two local-server bind failures reproduce unchanged on untouchedorigin/refactorin this sandboxbun run typecheckbun run lint:checksrc/assets/, I ran the snapshot update command and committed the updated snapshotsAdditional verification:
bun install --frozen-lockfilebun run format:checkbun run secrets:checkbun auditgit diff --checkChecklist
aws/agentcore-devx-devtools#2andaws/agentcore-cli#2005must mergeBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.