Skip to content

feat(tools/discourse): list category topics by latest activity - #24

Draft
MakerFlyFly wants to merge 4 commits into
audit/discourse-topic-list-basefrom
feat/discourse-topic-list
Draft

MakerFlyFly wants to merge 4 commits into
audit/discourse-topic-list-basefrom
feat/discourse-topic-list

Conversation

@MakerFlyFly

@MakerFlyFly MakerFlyFly commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Add 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.
  • Request descending activity order, filter on bumped_at and preserve native pinned positions. Look ahead for an extra unique match to prove truncation; pinned topics, including category About topics, count toward the limit.
  • Resolve IDs directly and bare slugs only among catalog roots. Keep strict whole-page validation, separate activity and last-message times, and declare Coverage: partial.

Type of change

  • Tool / bridge contract
  • Python package
  • Documentation

Test plan

  • Final Linux package suite: 361 tests pass (82 list cases and all 279 unchanged PR1 cases); ruff, format and mypy pass.
  • Tests cover native category references, incomplete catalogs, old pinned topics, inclusive cutoffs, deduplication, exact truncation, whole-page errors and fixed parameters on every request. The 3000-topic/two-match regression still uses 2 requests.
  • Five integration members pass: vendor-neutrality-score 42, skill-and-tool-validator 493, dev 372, spec-validator 87 and spec-inventory 31.
  • All-file non-test hooks: 40 Passed; workspace pytest intentionally separate. Committed-diff pytest selects only Discourse and passes 361 cases.
  • Magpie complete-PR A–E checklist passes for all three commits, with 0 blocking / 0 advisory items.
  • zizmor 1.30.1 offline: no unsuppressed findings (1 ignored, 18 suppressed).
  • Final anonymous CLI verification: 4 actual HTTPS GETs; 5 including the planning probe, below the round limit of 10. No forum writes.
  • Native Claude validation is internally skipped because its CLI is absent. Test collections overlap and are not added as independent totals; full-workspace pytest was not run.
  • Cloud checks are separate: prek was cancelled for both 7f5d83d0 and 4e72eb9. Neither is counted as passed; current-head results are assessed separately.

RFC-AI-0004 compliance

  • Sandbox — forum origin/path restrictions remain; no sandbox or host-allowance changes.
  • Vendor neutrality — Discourse-specific behavior stays in the partial adapter.
  • Write-access discipline — GET only, including redirects; automated HTTP tests use mocks.
  • Privacy LLM — no model calls; callers establish visibility and apply existing privacy approval before sending content to a model.

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

  • Fixed audit base: b9e14009367f37efce807e473b95c331286036a1 (audit/discourse-topic-list-base). Head: a3794eff6acfb9e9a2635da28fa3632ac65fe8ab (feat/discourse-topic-list). The complete PR contains PR2 only: 10 files, +1018/-9.
  • Business-review delta: six files, +278/-476. History is preserved.
  • The earlier draft's ID-less parent/child syntax is removed. Use an ID, a same-forum category URL or slug/.../ID for descendants; top-level slug lookup can be incomplete and suggests an ID when unresolved.
  • Continuation strings are signals only. Their URL and parameters are not consumed; each request is rebuilt locally with fixed category/activity parameters and an incrementing page. Empty/repeated complete pages claiming continuation still fail.
  • Without --since, there is no fixed recent-time window. Filtering returned pinned topics does not refill the result. With since, only an older topic explicitly marked pinned: false establishes a cutoff.
  • All received records are validated, including records beyond the output limit or cutoff. The changing list is not a consistent snapshot.
  • General resource budgets, retries, Hot/Top ranking, search, writes, shared-client refactoring and remaining archive verbs are outside this slice. Budget design remains after PR2 and before PR3.
  • Owner manual review is pending before any upstream submission.

AI disclosure

AI-generated draft for owner audit. Codex (GPT-6) assisted implementation, review-response analysis, tests and validation.
This draft does not claim completed contributor manual review.

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)
@MakerFlyFly MakerFlyFly added enhancement New feature or request family:tools contract:mail-archive Public mailing-list and forum archive reads labels Oct 26, 2026 — with ChatGPT Codex Connector
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)
@MakerFlyFly MakerFlyFly changed the title feat(tools/discourse): list recent category activity feat(tools/discourse): list category topics by latest activity Oct 26, 2026
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contract:mail-archive Public mailing-list and forum archive reads enhancement New feature or request family:docs family:tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant