Skip to content

fix(ci): restore refactor workflow parity through shared automation - #2006

Open
aidandaly24 wants to merge 2 commits into
refactorfrom
fix/refactor-workflow-parity-shared
Open

fix(ci): restore refactor workflow parity through shared automation#2006
aidandaly24 wants to merge 2 commits into
refactorfrom
fix/refactor-workflow-parity-shared

Conversation

@aidandaly24

@aidandaly24 aidandaly24 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Description

Restore workflow parity on refactor while keeping reusable mechanics in
aws/agentcore-devx-devtools.

  • add branch-native CodeQL
  • keep Bun static checks under CI and add Secretlint to lint, format, typecheck, and audit
  • consolidate PR Size/Title, Security, and Harness into one local pr-automation.yml
  • call the shared Security and Harness implementations from separate gated jobs
  • keep CLI-specific Harness prompts and image configuration local
  • publish Harness reviews through the existing AgentCore DevX GitHub App
  • format two files already on refactor that the restored formatting check rejects

Harness invocation/publishing and Security branch authorization come from
aws/agentcore-devx-devtools#2. Current default-branch trigger coverage comes
from aws/agentcore-cli#2005.

Related Issue

N/A - workflow parity for the unreleased refactor branch.

Documentation PR

N/A

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Other (please describe):

Testing

How have you tested the change?

  • bun test completed with 1,411 passing tests; seven process-control failures and two local-server bind failures reproduce unchanged on untouched origin/refactor in this sandbox
  • I ran bun run typecheck
  • I ran bun run lint:check
  • If I modified src/assets/, I ran the snapshot update command and committed the updated snapshots

Additional verification:

  • bun install --frozen-lockfile
  • bun run format:check
  • bun run secrets:check
  • bun audit
  • parsed every workflow YAML file
  • git diff --check

Checklist

  • I have read the CONTRIBUTING document
  • Shared action tests cover the Harness publishing fix
  • I have updated the documentation accordingly
  • No new example is needed for this CI-only change
  • My changes generate no new warnings
  • Dependencies aws/agentcore-devx-devtools#2 and aws/agentcore-cli#2005 must merge

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.

@aidandaly24
aidandaly24 requested a review from a team August 14, 2026 20:15
@github-actions github-actions Bot added agentcore-harness-reviewing AgentCore Harness review in progress and removed agentcore-harness-reviewing AgentCore Harness review in progress labels Aug 14, 2026
@codecov-commenter

codecov-commenter commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.01%. Comparing base (01eb60b) to head (c692ebb).
⚠️ Report is 1 commits behind head on refactor.

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.
📢 Have feedback on the report? Share it here.

🚀 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.

Comment thread .github/harness/prompts/review.md Outdated
- **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

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.

we might want to remove this, since its non-existent on this branch.

Comment thread .github/harness/prompts/system.md Outdated

## Testing with a bundled distribution

Run `npm run bundle` in `agentcore-cli/` to create a tar distribution that includes the packaged

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.

this is no longer true right? I imagine we'll have a new bun command at some point?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will remove this

branches:
- main
- refactor
- feat/summit_release

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.

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

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.

whats the advantage of moving this into its own workflow vs a job that's part of CI?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread .github/workflows/pr-ai-review.yml Outdated
@@ -0,0 +1,28 @@
name: AgentCore Harness Reviewing

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.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread .github/harness/README.md

```bash
finch build \
--build-arg CLONE_TOKEN=<pat-for-cloning> \

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.

q: do we know what token is this? Do we want to migrate the harness reviewer to use the bot credentials?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread .github/workflows/codeql.yml Outdated
branches: [main, refactor]
pull_request:
branches: [main, refactor, "feat/**"]
pull_request_target:

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.

does this run the workflow twice on PRs (once on the upstream and once on the fork)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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.

3 participants