Files
gitea-axi/CLAUDE.md
alexion c2c5f1728c
All checks were successful
CI / test (pull_request) Successful in 45s
CI / test (push) Successful in 46s
test: poll for indexer consistency in search e2e (task 0016)
Gitea's issue/PR search endpoint is backed by an asynchronous, eventually-
consistent indexer (bleve by default), so a PR opened moments earlier in the
e2e `beforeAll` was not yet searchable when `search prs` ran, and the live
assertion saw zero matches. Both live-search tests now poll the search via
`expect.poll` until the freshly-created content is indexed before asserting on
the exact locator-schema output. Record the eventual-consistency behaviour as
a project gotcha.
2026-07-14 10:09:51 -04:00

1.5 KiB

gitea-axi — Agent Instructions

Commits

Any commit message you write must follow the Conventional Commits specification as documented in CONVENTIONAL-COMMITS.md.

Gotchas

The origin remote is a self-hosted Gitea instance (git.alexion.dev), not GitHub. The gh CLI does not work here.

Prefer this project's own CLI for pull requests — it is the tool being built, so opening its PRs with it is the dogfood path: npm run build && node dist/main.js pr create --login alexion --base main --head <branch> --title <text> --body-file <path>. It reuses the tea login profiles, so it needs no separate credentials. Fall back to tea pr create --login alexion --base main --head <branch> only for what gitea-axi cannot do yet; tea pr still lists PRs until pr list lands (task 0008).

Task branches are merged into main on the remote, so the local main goes stale. Always git fetch origin and cut a task branch from origin/main, not from whatever local main happens to point at.

Gitea's issue/PR search endpoint (GET /repos/issues/search, behind search issues/search prs) is backed by an asynchronous, eventually-consistent issue indexer (bleve by default). Content created moments earlier may not be searchable yet, so end-to-end assertions that create an issue/PR and then search for it must poll (e.g. expect.poll) until it is indexed rather than searching once. The fixture tier is unaffected — it stubs the endpoint — so this bites only the live test/e2e tier.