@forgejo: make run, task, and job handles explicit and bounded #88

Open
opened 2026-08-15 11:16:38 +00:00 by PerishFire · 0 comments
Owner

The bounded status-to-log path added by #80/#82/#83 works in Runseal v0.17.0, but its handle domains remain easy to mix up and one list path scales with the entire repository history.

Observed while monitoring PerishLab/plumb recovery run 693 on 2026-08-15:

  • run show 3538 accepts the Forgejo API run ID and reports run number 693.
  • job list 693 correctly returns job indexes, names, and statuses. This is the right path and should remain the canonical bridge to job log.
  • task list 693 took about 30 seconds because it paged roughly 1904 repository tasks before filtering one run number.
  • The task endpoint returned executor task ID 7229 for coordinate. Passing that ID to job log 690 7229 produced HTTP 500. The valid log handle was job index 3, obtainable from job list.
  • run show, task list, job list, and job log therefore accept three distinct numeric domains whose terse help names do not fully distinguish them: API run ID, run number, executor task ID, and job index.

Requested shape:

  1. Name each numeric domain explicitly in help, errors, and JSON fields: API_RUN_ID, RUN_NUMBER, TASK_ID, JOB_INDEX.
  2. Make the canonical traversal visible in help: run show API_RUN_ID -> job list RUN_NUMBER -> job log RUN_NUMBER JOB_INDEX.
  3. Normalize an invalid job handle into a local, structured error instead of surfacing the Forgejo HTTP 500. If practical, include the valid indexes from job list.
  4. Bound task list RUN_NUMBER independently of total task history. The Forgejo task feed is newest-first; the adaptor can stop after passing the requested run number if that ordering is contractual, or use a more direct endpoint when available.
  5. Add a regression fixture with a task ID that differs from its job index and enough unrelated task pages to prove bounded traversal.

This is not a request for CI orchestration or log search. It is an ergonomics and complexity closure around the existing atomic Forgejo operations.

The bounded status-to-log path added by #80/#82/#83 works in Runseal v0.17.0, but its handle domains remain easy to mix up and one list path scales with the entire repository history. Observed while monitoring PerishLab/plumb recovery run 693 on 2026-08-15: - `run show 3538` accepts the Forgejo API run ID and reports run number 693. - `job list 693` correctly returns job indexes, names, and statuses. This is the right path and should remain the canonical bridge to `job log`. - `task list 693` took about 30 seconds because it paged roughly 1904 repository tasks before filtering one run number. - The task endpoint returned executor task ID 7229 for coordinate. Passing that ID to `job log 690 7229` produced HTTP 500. The valid log handle was job index 3, obtainable from `job list`. - `run show`, `task list`, `job list`, and `job log` therefore accept three distinct numeric domains whose terse help names do not fully distinguish them: API run ID, run number, executor task ID, and job index. Requested shape: 1. Name each numeric domain explicitly in help, errors, and JSON fields: API_RUN_ID, RUN_NUMBER, TASK_ID, JOB_INDEX. 2. Make the canonical traversal visible in help: `run show API_RUN_ID` -> `job list RUN_NUMBER` -> `job log RUN_NUMBER JOB_INDEX`. 3. Normalize an invalid job handle into a local, structured error instead of surfacing the Forgejo HTTP 500. If practical, include the valid indexes from `job list`. 4. Bound `task list RUN_NUMBER` independently of total task history. The Forgejo task feed is newest-first; the adaptor can stop after passing the requested run number if that ordering is contractual, or use a more direct endpoint when available. 5. Add a regression fixture with a task ID that differs from its job index and enough unrelated task pages to prove bounded traversal. This is not a request for CI orchestration or log search. It is an ergonomics and complexity closure around the existing atomic Forgejo operations.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
PerishFire/runseal#88
No description provided.