Repository navigation
feat(tools/discourse): list category topics by latest activity - #24
Draft
MakerFlyFly wants to merge 4 commits into
Draft
MakerFlyFly wants to merge 4 commits into
MakerFlyFly wants to merge 4 commits into
Conversation
Projects using Discourse need to discover category discussions before fetching individual topics. Resolve category IDs and catalog paths, then read explicit activity-ordered lists through the existing GET client. Filter on bumped_at without substituting the last-message timestamp. Deduplicate matches and look ahead for an additional match so truncation reports evidence rather than assuming that another page contains results. Fail incomplete reads through the existing CLI error channel, and keep the adapter partial until the remaining archive operations are available. Generated-by: Codex (GPT-6)
5 tasks done
Use the requested native descending activity order to stop when an explicitly non-pinned topic is older than since. Missing pin evidence must not be replaced by the output default when deciding the cutoff. Keep category metadata separate from slug matching so an empty or unusable slug does not block numeric ID reads or unrelated selections. Resolve bare slugs only at the catalog root, requiring full ancestry or a numeric ID for subcategories and incomplete catalogs. Retain evidence-based truncation and the integer-conversion error channel. Add regressions and clarify the supported CLI behavior. Generated-by: Codex (GPT-6)
Resolve category IDs from native references and restrict catalog lookup to top-level slugs. Treat continuations as signals while rebuilding every request with the fixed category and activity order. Keep whole-page validation and exact truncation, consolidate regressions, and clarify that pinned category topics count toward the result limit. Generated-by: Codex (GPT-6)
Resolve category paths against the configured forum without duplicating its base path. Keep full URL boundaries and reject protocol-relative references before any request. Clarify unsupported list-view suffixes and cover rooted paths on root and subfolder installations. Generated-by: Codex (GPT-6)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
magpie-discourse topic list --category <id|slug|url|slug/.../id> [--since <ISO-8601>] [--limit N]so projects can discover category discussions before reading individual topics. Include subcategories and reuse the existing GET client.bumped_atand preserve native pinned positions. Only an extra unique match proves truncation; pinned topics, including old category About topics, count toward the limit.Coverage: partial.Type of change
Test plan
/c/dev/7succeeds; unsupported views still fail before HTTP.c2805481used 2 actual HTTPS GETs, with no forum writes; its round budget was 10.a3794effhead has successful checks, including prek. Historical prek runs for 7f5d83d0 and 4e72eb9 were cancelled and are not counted as passed. Current-head checks are assessed separately.RFC-AI-0004 compliance
Linked issues
Owner audit: MakerFlyFly/magpie#23.
Refs apache/magpie#307, following merged apache/magpie#1755.
This slice does not close the broader request.
Notes for reviewers
b9e14009367f37efce807e473b95c331286036a1(audit/discourse-topic-list-base). Head:c2805481f4635aaf9aa5807eafab2bb51d3714ac(feat/discourse-topic-list). Full PR: 10 files, +1046/-9./forumbase path, both/c/dev/7and/forum/c/dev/7select category 7. Complete URLs must include the configured forum path. References are validated, then only numeric-ID endpoints are requested.//host/...) are rejected. ID-less manual ancestry paths and view/API suffixes (/none,/l/...,.json) are unsupported rather than silently changing their meaning.pinned: falseestablishes a cutoff.c2805481and authorized upstream publication. Upstream PR #1841 is open and Ready for review.888098ee6d535c993ee47718d1b9f285f7c1932e, based on27597d574c5fad21b89448a99bae60582dc305e5. Four range-diff entries are equal; the full feature patch and all ten changed files are byte-identical to this audited version. This fork PR remains Draft on its original head and fixed audit base.AI disclosure
AI-assisted audit record. Codex (GPT-6) assisted implementation, review-response analysis, tests, validation and publication.
The owner has confirmed completed manual review of
c2805481and authorized the byte-identical rebased upstream submission. This fork PR remains Draft for audit history; no formal Approve or merge was posted.