Skip to content

Document activity API response shape#253

Merged
ramimbo merged 1 commit into
ramimbo:mainfrom
vgtmy:docs/activity-api-example-229
May 25, 2026
Merged

Document activity API response shape#253
ramimbo merged 1 commit into
ramimbo:mainfrom
vgtmy:docs/activity-api-example-229

Conversation

@vgtmy
Copy link
Copy Markdown
Contributor

@vgtmy vgtmy commented May 25, 2026

Summary

  • Document the /api/v1/activity?q=... filter and response shape in public API examples
  • Add a focused docs regression test for activity totals, contributor rollups, recent payment rows, and proof links
  • Evidence: compared against app/main.py::activity_to_dict() / api_activity() and the live unauthenticated endpoint https://api.mrwk.ltclab.site/api/v1/activity?q=p3xill

Test Plan

  • python3 scripts/docs_smoke.py
  • /opt/hermes/.venv/bin/python -m pytest tests/test_docs_public_urls.py -q

Refs #229
Bounty #229
/claim #229

Copy link
Copy Markdown
Contributor

@MolhamHamwi MolhamHamwi left a comment

Choose a reason for hiding this comment

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

No blockers found.

Evidence checked:

  • Inspected the diff in docs/api-examples.md and tests/test_docs_public_urls.py; the documented /api/v1/activity?q=p3xill response shape matches the current activity_to_dict() implementation: top-level totals, query, contributors, and recent, with contributor rollups and recent payment rows.
  • Cross-checked app/main.py behavior for query filtering, contributor sorting by accepted MRWK, recent[:100], and removal of internal amount_microunits before returning the public response.
  • Queried the live public endpoint https://api.mrwk.ltclab.site/api/v1/activity?q=p3xill and confirmed the documented example keys and sample values are consistent (accepted_awards: 2, accepted_mrwk: "115", ledger_sequence: 399, bounty_id: 37, bounty_issue_number: 219).
  • Ran local checks: pytest tests/test_docs_public_urls.py -q (14 passed), ruff check docs/api-examples.md tests/test_docs_public_urls.py, ruff format --check tests/test_docs_public_urls.py. The Markdown file is not passed to ruff format --check because this Ruff version reports Markdown formatting as preview-only.

Copy link
Copy Markdown

@Thanhdn1984 Thanhdn1984 left a comment

Choose a reason for hiding this comment

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

Review claim for #219 on PR #253:

  • PR: #253
  • Scope checked: docs/api-examples.md + tests/test_docs_public_urls.py changes for bounty #229 activity API example.
  • Evidence checked against diff: documents /api/v1/activity?q=..., response totals, contributor rollups, recent payment rows, proof hash/url fields, bounty id/issue fields, and sort/cap guidance.
  • Local validation on PR head c581bc7: python3 scripts/docs_smoke.py -> docs smoke ok; python3 -m pytest tests/test_docs_public_urls.py -q -> 14 passed; git diff --check origin/main...HEAD -> clean.
  • Result: approve. The example/test are docs-only, match the advertised public activity shape, and don't expose secrets, private keys, payout credentials, private vulnerability details, PayPal details, or MRWK price claims.

Copy link
Copy Markdown

@weilixiong weilixiong left a comment

Choose a reason for hiding this comment

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

Review ✅ APPROVED

QUALITY_GATE: LOW — docs: activity API response shape with search.

  • Documents activity API q search parameter
  • Clear example response with totals/contributor rollups/recent rows
  • No code changes

Bounty: MW #229 (API examples, 75 MRWK) + #219 (review, 40 MRWK)

@ramimbo ramimbo merged commit c1a0a24 into ramimbo:main May 25, 2026
1 check passed
@ramimbo ramimbo added mrwk:accepted Maintainer accepted for payout mrwk:paid Ledger payment recorded labels May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mrwk:accepted Maintainer accepted for payout mrwk:paid Ledger payment recorded

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants