Commit Graph

18 Commits

Author SHA1 Message Date
github-actions[bot] bc32747d42 chore: daily ranking refresh 2026-05-24 03:53:29 +00:00
github-actions[bot] cd23c8f1bd chore: daily ranking refresh 2026-05-23 03:32:00 +00:00
github-actions[bot] 42433a22f2 chore: daily ranking refresh 2026-05-22 03:55:23 +00:00
github-actions[bot] 7946b4a391 chore: daily ranking refresh 2026-05-21 03:59:24 +00:00
github-actions[bot] c55f26f9f3 chore: daily ranking refresh 2026-05-20 03:51:04 +00:00
github-actions[bot] 4e4be37bdb chore: daily ranking refresh 2026-05-19 03:50:36 +00:00
github-actions[bot] b10ea5506b chore: daily ranking refresh 2026-05-18 07:57:53 +00:00
tiennm99 110afce2a6 style: gofmt history_test.go 2026-05-14 15:49:05 +07:00
tiennm99 4ccee1420a docs: add LOCAL_DEV and CONTRIBUTING guides, explain Delta7d
Two new short docs unblock new contributors who currently have to read
the Go source to figure out the GITHUB_TOKEN requirement and the
agents.yml schema:

- docs/LOCAL_DEV.md walks through the PAT setup, the local run command,
  what files the run modifies, and how to revert before opening a PR.
- docs/CONTRIBUTING.md documents the agents.yml fields, enumerates the
  six valid category values, and explains the rename and deprecation
  policy now that history is keyed canonically.

Also add a one-sentence caption under the table in readme.tmpl so the
Delta7d column has a definition in the rendered README.
2026-05-14 15:49:05 +07:00
tiennm99 f0e10d6d26 fix(ci): narrow conflict resolution to bot-generated files only
The blanket git pull --rebase -X theirs in the push-retry loop silently
discarded conflicting changes in any file, so a maintainer push to
data/agents.yml racing with the daily run could be dropped without
warning. Replace it with a selective resolver: plain rebase first, then
inspect git diff --name-only --diff-filter=U; if every conflicting path
is data/history.jsonl or README.md (both bot-generated), resolve those
with --theirs and continue; otherwise abort the rebase and fail the run
loudly so the human edit is preserved and visible.

Also leave a comment at the permissions block warning future maintainers
not to swap GITHUB_TOKEN for a PAT, since the no-recursion invariant is
what currently prevents the auto-commit from triggering its own workflow.
2026-05-14 15:49:05 +07:00
tiennm99 62cbdd7a4a fix: harden GitHub fetcher and history I/O, add canonical keying
GitHub fetcher (github.go):
- add 30s HTTP client timeout (was http.DefaultClient with no bound)
- chunk GraphQL alias requests at 50 repos to stay clear of abuse detection
- abort the run on any partial GraphQL error or missing repo rather than
  silently shrinking the README and poisoning the next delta
- retry transient failures (network, 5xx, 429) with 2s/4s/8s backoff

History layer (history.go):
- key snapshots by canonical owner/repo from agents.yml instead of the
  rename-resolved NameWithOwner returned by the API; carry a lazy
  migration map so existing aaif-goose/goose entries fold into block/goose
  on next read with no manual data edit
- tighten the 7d delta window to (cutoff-3d, cutoff] so a missed cron week
  no longer mislabels a 90d-old comparison as Delta7d
- replace the snapshots[:0] aliased filter loop with slices.DeleteFunc
- log malformed JSONL lines to stderr with line numbers instead of
  silently skipping them
- write history.jsonl atomically via tmp file + rename so a crash
  mid-write can no longer truncate accumulated history

Plus collapse a few redundant fmt.Errorf wraps, drop a named Config type
that was used once, inline the single-call sortByStars helper with a
deterministic tiebreaker on canonical key, and use filepath.Base instead
of hand-rolling a basename.

Includes unit tests covering the 7d window edges, canonical-key
migration, atomic write path, malformed-line tolerance, YAML validation,
and markdown cell escaping.
2026-05-14 15:49:05 +07:00
github-actions[bot] 544beb6b52 chore: daily ranking refresh 2026-05-14 03:39:23 +00:00
github-actions[bot] 099014934c chore: daily ranking refresh 2026-05-13 07:48:11 +00:00
tiennm99 e445ab91a2 fix(workflow): use -X theirs to resolve history.jsonl rebase conflicts 2026-05-13 14:47:49 +07:00
github-actions[bot] be64df310d chore: daily ranking refresh 2026-05-13 07:46:30 +00:00
tiennm99 515315de78 fix(workflow): rebase-retry on push to handle concurrent run races 2026-05-13 14:45:59 +07:00
github-actions[bot] db1040bbe8 chore: daily ranking refresh 2026-05-13 07:44:30 +00:00
tiennm99 03704df0a5 feat: initial scaffold of awesome-coding-agents tracker
Go updater that fetches AI agent coding tool repo stats via GitHub GraphQL
(batched, one query), sorts by star count, appends a daily snapshot to
data/history.jsonl, and regenerates README.md from templates/readme.tmpl.
Daily workflow at .github/workflows/update.yml refreshes rankings and
commits changes. Seed list in data/agents.yml covers 19 tracked repos.
2026-05-13 14:43:35 +07:00