Skip to content

docs: update activity API example fields#412

Merged
ramimbo merged 1 commit into
ramimbo:mainfrom
carpedkm:codex/api-activity-docs-411
May 26, 2026
Merged

docs: update activity API example fields#412
ramimbo merged 1 commit into
ramimbo:mainfrom
carpedkm:codex/api-activity-docs-411

Conversation

@carpedkm
Copy link
Copy Markdown

@carpedkm carpedkm commented May 26, 2026

Bounty #411

Summary

  • Update the public /api/v1/activity example so contributor rollups include latest bounty metadata.
  • Update recent activity row examples with bounty_repo, bounty_issue_url, and bounty_url fields that the current serializer and live API return.
  • Add docs regression assertions for the documented activity fields.

Evidence

Compared docs/api-examples.md with current code in app/serializers.py and the live unauthenticated endpoint:

curl -s 'https://api.mrwk.ltclab.site/api/v1/activity?limit=1' | jq '{keys:keys, recent0:.recent[0]}'

Observed live recent[0] includes bounty_repo, bounty_issue_url, and bounty_url alongside bounty_id and bounty_issue_number. The old docs example only showed bounty_id and bounty_issue_number.

Expected PR size: small docs/test update.

Tests

  • /Users/daneul.kim/Documents/New\ project/bounty-work/mergework/.venv/bin/python scripts/docs_smoke.py -> docs smoke ok
  • /Users/daneul.kim/Documents/New\ project/bounty-work/mergework/.venv/bin/python -m pytest tests/test_docs_public_urls.py -q -> 17 passed
  • /Users/daneul.kim/Documents/New\ project/bounty-work/mergework/.venv/bin/python -m ruff check docs/api-examples.md tests/test_docs_public_urls.py -> passed
  • git diff --check -> clean

No private keys, seed material, secrets, private vulnerability details, deployment credentials, price claims, investment claims, liquidity claims, bridge promises, exchange claims, or fabricated payout claims are included.

Summary by CodeRabbit

  • Documentation
    • Expanded activity API docs with additional query filter options to support filtering by bounty repository and bounty issue URL.
    • Updated example activity response to include richer bounty metadata: contributor-level latest bounty fields and bounty fields on recent activity entries (repo, issue number, issue URL, and bounty URL).

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 76f2560b-05f8-437f-a00e-2d4fbc772fa4

📥 Commits

Reviewing files that changed from the base of the PR and between e82c336 and df18b03.

📒 Files selected for processing (2)
  • docs/api-examples.md
  • tests/test_docs_public_urls.py

📝 Walkthrough

Walkthrough

Updates API docs for GET /api/v1/activity to broaden the q filter description and extend the example response with contributor-level latest_bounty_* fields and bounty fields on recent entries; tests were extended to assert the new example fields are present.

Changes

Activity API Bounty Metadata

Layer / File(s) Summary
API documentation for bounty metadata fields
docs/api-examples.md
The q parameter description now lists bounty-related filter inputs, and response examples extend contributors objects with latest_bounty_repo, latest_bounty_issue_number, and latest_bounty_issue_url, while recent objects add bounty_repo, bounty_id, bounty_issue_number, bounty_issue_url, and bounty_url.
Test validation of bounty metadata in documentation
tests/test_docs_public_urls.py
Test assertions extended to verify the presence of the newly documented bounty metadata fields (latest_bounty_repo, latest_bounty_issue_number, latest_bounty_issue_url, bounty_repo, bounty_issue_number, bounty_issue_url, bounty_url) in the activity API example documentation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • ramimbo/mergework#301: Main PR that adds/emits bounty URL and ID fields in activity "recent accepted work" responses, directly aligned with the documentation expansion in this PR.
  • ramimbo/mergework#303: Adds the same "latest bounty" metadata fields (latest_bounty_repo, latest_bounty_issue_number, latest_bounty_issue_url) to the activity contributor payload that are now documented in this PR.

Suggested labels

mrwk:accepted, mrwk:paid

Suggested reviewers

  • g8rr5dg2p7-svg
  • weilixiong
  • TateLyman
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: updating the activity API example documentation with new fields.
Description check ✅ Passed The description follows the template structure with Summary, Evidence, and Tests sections; all required information is present and well-documented.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@carpedkm carpedkm force-pushed the codex/api-activity-docs-411 branch from e82c336 to df18b03 Compare May 26, 2026 14:45
ramimbo pushed a commit that referenced this pull request May 26, 2026
Public MCP docs list get_ledger_entry and get_wallet, but the API examples did not show direct JSON-RPC calls or the wrapped result.content[0].text response shapes. This adds two focused examples and pins the documented fields with a docs regression test.

Constraint: Bounty #411 asks for accurate public API or MCP examples backed by app code or live endpoints

Rejected: Update activity API examples | already covered by open PR #412

Confidence: high

Scope-risk: narrow

Directive: Keep MCP examples synchronized with app/mcp_tools.py and serializer response wrappers

Tested: .venv/bin/python -m pytest

Tested: .venv/bin/python -m ruff format --check .

Tested: .venv/bin/python -m ruff check .

Tested: .venv/bin/python -m mypy app

Tested: .venv/bin/python scripts/docs_smoke.py

Tested: git diff --check

Not-tested: live public MCP and REST endpoint calls from this network timed out
@ramimbo ramimbo merged commit b635f57 into ramimbo:main May 26, 2026
2 checks passed
@ramimbo ramimbo added mrwk:accepted Maintainer accepted for payout mrwk:paid Ledger payment recorded labels May 26, 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.

2 participants