Skip to content

docs(decisions): ADR-027 propose git provider abstraction (#456) - #1032

Open
ClintEastman02 wants to merge 14 commits into
aws-samples:mainfrom
ClintEastman02:docs/456-git-provider-adr
Open

ClintEastman02 wants to merge 14 commits into
aws-samples:mainfrom
ClintEastman02:docs/456-git-provider-adr

Conversation

@ClintEastman02

Copy link
Copy Markdown
Contributor

Proposes ADR-025: a provider abstraction so ABCA can work with git hosts other than GitHub (GitLab first, per #456), with GitHub refactored as the reference implementation. This PR is the design only; no code changes.

Area

  • cdk — infrastructure, handlers, constructs
  • agent — Python runtime / Docker image
  • cli — bgagent client
  • docs — guides or design sources (docs/guides/, docs/design/)
  • tooling — root mise.toml, scripts, CI workflows

Related

Stack position

PR 1 for #456 — provider abstraction for non-GitHub git hosts

Prior: none (targets main)

This PR: ADR-025 (proposed) and its generated Starlight mirror

Next: Phase 1, as small stacked PRs, each verified on its own and with no behaviour change for existing GitHub repos:

  • the git_providers contract in contracts/constants.json and orchestrator plumbing: git_provider resolved fail-closed in loadBlueprintConfig and carried in every payload
  • agent runtime: the field survives AgentCore, MicroVM and ECS into TaskConfig; an unsupported value fails before clone
  • CLI: repo onboard / repo show respect a stored value
  • preflight routed through an ScmProvider interface, with GitHub delegating to the existing checks (wire behaviour pinned by a golden test)

Changes

docs/decisions/ADR-025-git-provider-abstraction.md decides:

  1. The repo row is the only authority for git_provider. An absent value means github, so existing rows are unaffected. An unrecognised value fails at blueprint load. A workflow's repo_config.provider is a constraint, never a source.
  2. Interfaces sized to real call sites. GitProvider (agent) and ScmProvider (handlers); GitHub delegates to existing code.
  3. Capabilities are declared, not assumed. A missing capability never passes a check by omission.
  4. ScmCredential bound per repo by a binding the orchestrator chooses, not the agent. Tokens never touch disk. Redaction only widens.
  5. Provider-neutral agent tools replace gh in prompts. PR creation stays deterministic in ensure_pr.
  6. Repository identity: bare owner/repo stays GitHub; other hosts use <provider>:<host>/<path>.
  7. Optional providers gate on DeploymentFeatures (amends ADR-024 §1).
  8. One webhook receiver for non-GitHub providers, with fail-closed verification.
  9. Normative requirements in EARS (ADR-020).
  10. Phased delivery, and an explicit list of what accepting the ADR approves. Repository CRUD over REST (feat(api): REST API for repository onboarding and management #1021) stays out of scope until that issue is approved. Azure DevOps and plain git each need their own approved issue.

Status is proposed; per the ADR lifecycle it is accepted when its implementing PR merges.

Testing: mise //docs:sync (mirror regenerated and committed) and mise //docs:build both pass.

Acknowledgment

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

…s#456)

Record the design for a GitProvider (agent) / ScmProvider (handlers)
abstraction with GitHub as the reference implementation, per aws-samples#456.

Adopts the layering from PR aws-samples#824 and turns the failure modes its
review found into rules: the repo row is the only authority for
git_provider, unknown values fail closed, every payload hop gets a
round-trip test, capabilities are declared rather than assumed,
ScmCredential is bound to its repo by a binding the agent cannot
choose, tokens never touch disk, and redaction only widens.

Delivery is phased (0, 1a-c, 2, 3a-b, 4 GitLab, 5 Bitbucket); this
commit is Phase 0 with no behaviour change. Starlight mirror
generated with docs:sync.

Refs aws-samples#456

Co-authored-by: Kiro <noreply@kiro.dev>
@codecov-commenter

codecov-commenter commented Nov 12, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@4fb3f99). Learn more about missing BASE report.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1032   +/-   ##
=======================================
  Coverage        ?   93.80%           
=======================================
  Files           ?      406           
  Lines           ?   116911           
  Branches        ?    12989           
=======================================
  Hits            ?   109670           
  Misses          ?     6639           
  Partials        ?      602           

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

@krokoko

krokoko commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Thanks for tracing where GitHub is wired in. Could we bring the first GitLab task forward in the plan? I’d start by onboarding a GitLab.com project, running coding/new-task-v1, opening a merge request, and sending a follow-up to that same MR. Running the same workflow on GitHub would tell us which parts of the adapter the two hosts actually need.

I’d change the credential proposal in §4 before accepting the ADR. ECS and MicroVM can store task payloads in S3, and their compute roles can read other tasks’ payloads. Please keep the payload to a secret reference and spell out how each task gets access to just its own token. The platform GitHub token should also be scoped to github.com. An Enterprise Server repo with no credential of its own should fail before we contact that host.

A few details matter for that first GitLab task:

  • All four bundled coding workflows explicitly select github. Let an omitted provider mean “use the repo’s provider” and remove the pins from those workflows. That lets GitLab use the same YAML.
  • Save the MR number alongside its URL. Some follow-up tasks recover the number by looking for /pull/ in the URL, so today they’d report that a GitLab MR doesn’t exist.
  • The period in gitlab.com makes the example repo key invalid as an AgentCore Memory actorId. Give new keys a stable memory ID that both readers and writers use.

Since the proposed repo key already identifies the provider, I’d derive the provider from it and drop the extra stored field. I’d keep the GitLab pipeline webhook in scope for #456 and leave the decision about sharing a receiver with Bitbucket until there’s a second implementation.

ClintEastman02 and others added 2 commits November 20, 2026 10:55
Responds to review on aws-samples#1032: key-derived provider with no stored field, reference-only payload and github.com scoping of the platform secret, providers omitted from bundled workflows, pr_number stored, stable memory actor id, GitLab pipeline webhook in scope, first GitLab task moved to Phase 3.

Co-authored-by: Kiro <noreply@kiro.dev>
@ClintEastman02

Copy link
Copy Markdown
Contributor Author

Thanks, this was useful. I pushed a revision that takes all of it:

  • The provider is now derived from the repo key. There is no stored git_provider field anywhere (§1), and one shared test corpus keeps the CDK, agent and CLI copies of the derivation identical.
  • The four bundled coding workflows drop their github pin. An omitted provider means the repo's provider, and a set one must match the key.
  • §4: the payload carries at most a secret ARN, never a token or session credential. The platform GitHub secret is used only for github.com. A GitHub Enterprise Server repo with no credential of its own fails before we contact the host.
  • pr_number is stored whenever a PR or MR is created, so follow-ups no longer depend on /pull/ in the URL.
  • New keys get a stable memory ID through one shared function. Bare GitHub keys map to themselves, so existing memory stays reachable.
  • The GitLab pipeline webhook is in scope for feat(adapters): GitLab integration (Bitbucket optional) #456. Whether Bitbucket shares the receiver waits until there is a second provider.
  • The first GitLab task (onboard, coding/new-task-v1, MR, follow-up on the same MR, with the same run on GitHub as comparison) is now Phase 3, right after credentials.

One thing I left open for your input: the mechanism that gives each task access to only its own token on ECS, MicroVM and AgentCore. §4 sets the requirement, and the Phase 2 PR picks the mechanism. If you already prefer one approach, I'll write it into the ADR.

@isadeks isadeks 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.

Thanks for the revision. The layering (key-derived provider, capability declarations, deterministic PR creation, structured review findings) reads well and should carry GitHub, GitLab and Bitbucket Cloud. Inline comments cover the specifics; the main themes are below.

Should be resolved before accepting

  1. Both Phase 2 delivery candidates conflict with §4/§9 (no token or session credential in the payload).
  2. memoryActorId identity mapping for bare GitHub keys that contain a period.
  3. Host canonicalisation, so github.com cannot be spelled a second way.
  4. GitHub Enterprise Server keys are admitted in Phase 1a but only guarded in Phase 2.
  5. The legacy github_token_secret_arn fallback conflicts with the prefix/tag check and the prefix-scoped grant.
  6. The credential contract shape (scm_token_secret_arn, one credential per repo) is built for a static per-repo secret, which will not fit the GitHub App (#50) or Token Vault (#249) resolvers the ADR names as successors. I am not asking for those resolvers to be in scope here, only for the contract this ADR approves to leave room for them.

How far the abstraction reaches

Worth stating in the ADR, even if only as known limits:

  • The vocabulary is closed. A new provider means editing the vocabulary, three copies of providerOfRepoKey, two interfaces, a DeploymentFeatures key and synth-time egress. Is an out-of-tree or internal provider meant to be supported, or explicitly not?
  • "Each provider supplies only its HTTPS username" assumes HTTPS plus a token. codecommit is in the vocabulary and uses SigV4; self-hosted tools often use SSH or mTLS.
  • git push is declared provider-neutral and pr_number is a number. Tools that push to a review ref, or whose review ids are not numeric, do not fit.
  • One prefix per product: Bitbucket Cloud and Bitbucket Data Center have different APIs under bitbucket:, so dispatch needs the host as well.
  • Issue listing sits in ScmProvider (Phase 4), but many teams keep issues in a separate tracker.
  • Private hosts need network reachability in both directions, not only a DNS allowlist entry.

Smaller points

Numbering clash with #1013, the Amends header versus the documented ADR process, and a few cross-references. Details inline.

- Agent compute roles get no `bgagent/scm/*` grant. A prefix grant there would let a prompt-injected task read every repo's token.
- The agent receives only its own repo's token. The binding comes from the orchestrator, not from the agent. Today's `AgentSessionRole` `repo` session tag does not qualify: the agent sets it from its own config, and it drives only cost attribution. Phase 2 chooses between two mechanisms:
- orchestrator-minted session credentials whose `repo` tag the orchestrator sets, with the grant conditioned on `secretsmanager:ResourceTag/bgagent:repo` equal to `${aws:PrincipalTag/repo}`;
- the orchestrator resolving the token and delivering it through the per-task payload channel.

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.

Both candidates seem to conflict with the rules in this section and §9. This one delivers the token through the per-task payload, and the first needs orchestrator-minted session credentials to reach the agent, while §4 and §9 say the payload shall contain neither a repository token nor a session credential. The Context section also notes that every task's compute role can read the shared payload bucket, so a token in the payload is readable by another repo's task.

Suggestion: name a delivery channel that is not the task payload (or make the payload per-task readable first), and reword each candidate so it satisfies §9.

- the orchestrator resolving the token and delivering it through the per-task payload channel.
- Token resolution moves from the compute role (`platform_client`, before session setup) to that per-task path.
- Legacy `github_token_secret_arn` secrets are arbitrarily named and untagged. The Phase 2 PR states whether they are migrated to tagged SCM secrets or keep a compute-role read path.
- **Orchestrator check.** The orchestrator rejects a row whose secret is outside the prefix, or whose tag does not equal the task's repo key.

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 check and the prefix-scoped grant appear to make the legacy fallback unreadable. Trusted Lambdas get GetSecretValue only on bgagent/scm/*, and this check rejects a secret outside the prefix or without the tag, but §4 keeps github_token_secret_arn as a github.com fallback and notes those secrets are arbitrarily named and untagged. After Phase 2 such a repo would either be rejected or silently revert to the platform secret.

Could the ADR state whether the check applies only to scm_token_secret_arn, and how legacy ARNs are read? The tag comparison also needs DescribeSecret, which is not listed.

- Token resolution moves from the compute role (`platform_client`, before session setup) to that per-task path.
- Legacy `github_token_secret_arn` secrets are arbitrarily named and untagged. The Phase 2 PR states whether they are migrated to tagged SCM secrets or keep a compute-role read path.
- **Orchestrator check.** The orchestrator rejects a row whose secret is outside the prefix, or whose tag does not equal the task's repo key.
- **Payload key.** `scm_token_secret_arn` is a per-task payload key. The partition and account anchor check in `server.py` extends to cover it. Holding the ARN does not grant access to the secret: access comes from the per-task binding above.

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 the one contract that accepting the ADR approves, and it is shaped for a static per-repo Secrets Manager secret. A GitHub App installation or a Token Vault entry has no per-repo secret ARN, spans many repos, and yields tokens that expire mid-task (installation tokens last one hour). As written, #50 would have to change an approved contract.

Three small edits would leave room without adding the resolvers to scope:

  1. Make the key an opaque credential reference plus a resolver kind, with secrets_manager as the only kind in v1.
  2. Change "one per repo" to "binds at repo scope in v1", leaving wider scopes (namespace, host) to a later resolver.
  3. Add a requirement that the agent's token path tolerates a token that expires during a task. The credential helper reading a fixed environment variable does not.

Then list OAuth and GitHub App resolvers as out of scope in §10, pointing at this reference shape. If you would rather not change the contract in this revision, marking scm_token_secret_arn as provisional would also work.

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.

Following up after reading RFC #249, which is approved and has its Linear phase shipped (#809). It makes the AgentCore Identity Token Vault the credential source for outbound targets, GitHub included: GithubOauth2 is a built-in vendor, CustomOauth2 covers targets without one, and tokens bind to (workload identity, user) with refresh handled by the vault. Its Phase 1 text replaces direct Secrets Manager reads in resolve_github_token().

§4 here approves a Secrets Manager ARN as the contract and mentions the vault only as a later resolver. Could the ADR reconcile the two?


- **GitHub.** A bare `owner/repo` key means github.com, so existing rows need no migration. GitHub Enterprise Server uses `github:<host>/<owner>/<repo>`.
- **Other providers.** Every other repo uses `<provider>:<host>/<path>`, for example `gitlab:gitlab.com/group/sub/project`.
- **Consistency.** A key whose prefix is not in the vocabulary, or is `github:` with the host `github.com` (the bare form is the only spelling for github.com), fails config load.

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.

The single-spelling rule can be bypassed, because §9 requires exact matching with no case folding or trimming and no host normalisation is specified. github:GitHub.com/acme/app or github:github.com./acme/app would pass this check, be treated as an Enterprise Server key, and coexist with bare acme/app with its own row, memory identity and credential binding.

Suggestion: define host canonicalisation in providerOfRepoKey (lower case, no trailing dot, no port or www.), reject non-canonical hosts, and add those cases to contracts/repo-keys.json.

- **GitHub.** A bare `owner/repo` key means github.com, so existing rows need no migration. GitHub Enterprise Server uses `github:<host>/<owner>/<repo>`.
- **Other providers.** Every other repo uses `<provider>:<host>/<path>`, for example `gitlab:gitlab.com/group/sub/project`.
- **Consistency.** A key whose prefix is not in the vocabulary, or is `github:` with the host `github.com` (the bare form is the only spelling for github.com), fails config load.
- **Memory identity.** The repo key is not used as an AgentCore Memory `actorId`. One function, `memoryActorId(key)`, maps a key to a stable ID that is valid as an `actorId`. A bare GitHub key maps to itself, so existing memory records stay reachable. Any other key maps to `<provider>_<first 32 hex characters of SHA-256(key)>`. The CDK handlers and the agent both call it for every read and write, and the shared corpus in `contracts/repo-keys.json` covers it. The Phase 3 PR checks the output against the service's `actorId` constraints before any non-GitHub key is written.

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.

A bare GitHub key maps to itself, but owner/repo can contain a period (for example acme/site.js), which the Context section reports is not a valid actorId. The constraint check is deferred to Phase 3 and scoped to non-GitHub keys, so the function would ship in Phase 1a without being valid for every GitHub key, and the corpus would still pass because it pins identity for bare keys.

Suggestion: specify the mapping for bare keys with characters outside the actorId set, with a compatibility read path for existing records, and run the constraint check in Phase 1a over the whole corpus.

| 4 | GitLab remainder: hydration, comment upsert and issue listing behind `ScmProvider`; path grammar edge cases | new provider capabilities |
| 5 | Bitbucket Cloud, starting from #824, and the decision on a shared webhook receiver | new provider |

Accepting this ADR approves only the payload key `scm_token_secret_arn` as an agent-to-orchestrator contract addition. Each of the following is still raised as ask-first in its own PR:

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.

Nit: §1 and §4 describe scm_token_secret_arn as a key on the orchestrator → agent payload, so this should read "orchestrator-to-agent". The current direction reads like the agent-selected binding that §9 forbids.

- tokens persisted to `.git/config`;
- fail-open defaults.

§§1 to 5 and 8 turn these into rules. This phased plan supersedes #824. Its Bitbucket REST client, preflight probes and tests are the intended starting point for the Bitbucket phase, and @Agsiegert is invited to own it.

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.

Nit: the fail-open and webhook rules are in §9; §8 only defers decisions. Also, the Context and §10 discuss Azure DevOps, but the §1 vocabulary has no id for it, so it would be worth saying it needs a vocabulary addition.

**Revision:** 2 (responds to review on #1032)
**Amends:** ADR-016 (credential types), ADR-017 (custom token secrets), ADR-024 §1 (optional features)

Per the [ADR lifecycle](./README.md#lifecycle), this decision remains proposed until its implementing PR merges.

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.

Nit: with six implementing phases, which phase's merge moves the status to accepted?

**Date:** 2026-11-10
**Issue:** [#456](https://github.com/aws-samples/sample-autonomous-cloud-coding-agents/issues/456)
**Revision:** 2 (responds to review on #1032)
**Amends:** ADR-016 (credential types), ADR-017 (custom token secrets), ADR-024 §1 (optional features)

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.

Nit: docs/decisions/README.md describes two paths, refining in place with a dated Changelog entry or a new ADR that supersedes the old one, and its template has no Amends, Issue or Revision fields. ADR-014 also changes here (rule 14, and the meaning of an omitted repo_config.provider) but is not listed. The Consequences section says ADR-017 is refined in place, though this PR does not touch that file.

@@ -0,0 +1,180 @@
# ADR-025: Git provider abstraction

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.

Nit: open PR #1013 also adds an ADR-025 (ADR-025-trusted-approval-writer.md). Whichever merges second will need renumbering, including the docs mirror and the self-references.

- Token resolution moves from the compute role (`platform_client`, before session setup) to that per-task path.
- Legacy `github_token_secret_arn` secrets are arbitrarily named and untagged. The Phase 2 PR states whether they are migrated to tagged SCM secrets or keep a compute-role read path.
- **Orchestrator check.** The orchestrator rejects a row whose secret is outside the prefix, or whose tag does not equal the task's repo key.
- **Payload key.** `scm_token_secret_arn` is a per-task payload key. The partition and account anchor check in `server.py` extends to cover it. Holding the ARN does not grant access to the secret: access comes from the per-task binding above.

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.

One more on the contract shape: multi-repo tasks. Many repos with mixed providers per deployment work fine here, but every rule assumes a single repo key per task: the agent "receives only its own repo's token", the secret's tag must equal the task's repo key, the clone guard matches one key, and the task record stores one pr_number and pr_url.

A task that spans repos (for example a service and its infrastructure repo) would need a set of repo keys, one credential binding per key and a list of PRs on the record. The per-repo binding could extend to that, since the orchestrator can grant several tagged secrets to one task, but a single scm_token_secret_arn payload key cannot carry it.

I am not asking for this to be in scope. Could §10 list multi-repo tasks as out of scope and name the extension path (a list of credential references and PR records)? It is another reason to prefer an opaque reference over a single ARN key.

Responds to the review on aws-samples#1032:

- Credentials (4): an opaque scm_credential_kind and scm_credential_ref
  at repo scope in v1, so GitHub App and Token Vault resolvers add a
  kind without changing the approved contract. The credential helper
  asks a resolver per git operation, so expiring tokens work.
- Delivery channel (4, 9): no token or session credential in any
  channel another task's role can read. Phase 2 needs a per-task
  channel first (aws-samples#1015 or another). Both candidates reworded to use it.
- Legacy github_token_secret_arn (4): outside the prefix and tag check,
  exact-ARN read path, DescribeSecret added, never silently replaced by
  the platform secret.
- Identity (6, 9): hosts must be canonical and are rejected, not
  normalised. memoryActorId hashes any key outside the actorId pattern,
  including bare GitHub keys with a period. Checked in Phase 1a.
- GitHub Enterprise Server (1, 9, 10): every prefixed key is rejected
  until Phase 2.
- Known limits (11), multi-repo tasks and credential resolvers out of
  scope (10).
- Header, status trigger, 1a behaviour change, cross-references and
  "orchestrator-to-agent" wording fixed. Renumbered to ADR-027, since
  aws-samples#1013 holds 025 and main has 026.

Co-authored-by: Kiro <noreply@kiro.dev>
@ClintEastman02 ClintEastman02 changed the title docs(decisions): ADR-025 propose git provider abstraction (#456) docs(decisions): ADR-027 propose git provider abstraction (#456) Nov 25, 2026
@ClintEastman02

Copy link
Copy Markdown
Contributor Author

Thanks for the careful review. I pushed a revision (e33443db). The ADR is now ADR-027, because #1013 holds 025 and main has 026, and I updated the PR title to match.

Must-resolve points

  1. Delivery channel. No token or session credential may travel through a channel another task's role can read. Phase 2 needs a per-task channel first (fix(security): payload bootstrap v2 with signed per-task payload references #1015, or one the Phase 2 PR proves private), and both candidates now use it.
  2. Bare keys with a period. memoryActorId keeps keys that already match the actorId pattern and hashes the rest, including acme/site.js. The corpus check runs in Phase 1a.
  3. Host canonicalisation. A non-canonical host is rejected, not normalised.
  4. GitHub Enterprise Server. Every prefixed key is rejected until Phase 2.
  5. Legacy github_token_secret_arn. It is outside the prefix and tag check and keeps an exact-ARN read path. An unreadable credential fails the task and never falls back to the platform secret.
  6. Contract shape. The key is now an opaque scm_credential_kind and scm_credential_ref at repo scope, with a per-operation resolver call so expiring tokens work. Other resolvers and multi-repo tasks are out of scope in §10.

Also added. §11 lists the known limits you asked for. The nits are fixed, including the 1a behaviour change now reading "none".

Where I'd like your view.

  • Is "payload reads become per-task first" the right Phase 2 prerequisite, or should the ADR name a specific channel?
  • I wrote that out-of-tree providers are not supported. Say if you want that left open.

This branch has not been deployed

No deployments
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.

4 participants