Skip to content

feat(org): add OrgBadges.ActiveJobs schema field (#1127) - #135

Merged
jerryfane merged 1 commit into
mainfrom
g3/1127-active-jobs-badge
Jul 26, 2026
Merged

jerryfane merged 1 commit into
mainfrom
g3/1127-active-jobs-badge

Conversation

@jerryfane

Copy link
Copy Markdown
Collaborator

Summary

Schema-only half of gitmoot#1127: a role whose herdr seat goes idle while its
dispatched workers (attributed via ActingOrgRole, gitmoot#1114) are still
queued/running currently reads as plain "idle" on the org page — nothing
distinguishes "truly nothing happening" from "seat quiet, lane busy".

  • Adds OrgBadges.ActiveJobs int (json:"active_jobs,omitempty") — the live
    count of jobs currently queued or running, attributed to the role.
  • Deliberately distinct from the existing OrgRoleActivity.JobsToday (a
    same-UTC-day job-outcome histogram used by OrgRoleView) — the new
    field's doc comment names this distinction explicitly so a future reader
    doesn't collapse the two: ActiveJobs answers "is the lane busy right
    now", JobsToday answers "what happened today".
  • No rendering touched — web/ is untouched, nothing under it changed.
  • No population logic — this repo has no access to gitmoot's
    job/workflow store. A follow-up gitmoot/gitmoot PR populates the field
    (via the existing ActingOrgRole-derived job-count query already used
    internally for recycle status) and bumps this repo's pin in go.mod, per
    gitmoot-coc's ruling that the consuming PR owns the pin bump.

Scope note (gitmoot-coc's ruling)

g2's exclusive ownership of this repo was a collision guard specifically on
web/dist/index.html (the single-file UI two coordinators editing concurrently
would collide on), not a whole-repo claim — a schema-only Go DTO change
doesn't cross that boundary. g2 was notified before this PR was opened;
their dashboard queue is currently clear (#130/#129/#131/#1148 all merged).

Test plan

  • go build ./... (go1.26.4 local toolchain, satisfies this repo's go 1.23 directive — the plain go1.23 bare-toolchain auto-download is
    broken in this sandbox, unrelated to this change)
  • go vet ./...
  • go test ./... — green
  • New tests: TestOrgBadgesActiveJobsAdditiveJSONContract — legacy
    payload without active_jobs unmarshals cleanly and the zero value
    omits the key on marshal (byte-exact against the legacy shape,
    matching this file's existing TestWorkflowAdditiveJSONContracts
    house style); a set value round-trips correctly.
  • /code-review (workflow, fresh-context finders + verify pass,
    medium-scaled for a small additive-schema diff) — no findings
    survived verification.
  • Diff scope verified: only datasource.go and datasource_test.go
    changed.

🤖 Generated with Claude Code

Schema-only addition for gitmoot#1127 (a role whose herdr seat goes
idle while its dispatched workers are still queued/running currently
reads as plain "idle" on the org page). Adds a live queued+running
jobs count to OrgBadges, distinct from the existing
OrgRoleActivity.JobsToday (a same-UTC-day job-outcome histogram) — the
doc comment names the distinction explicitly so the two aren't
conflated.

No rendering touched (web/ untouched) and no population logic added —
this repo has no access to gitmoot's job/workflow store. A follow-up
gitmoot/gitmoot PR populates the field and bumps this repo's pin.

Per gitmoot-coc's ruling: g2's exclusive-ownership boundary on this
repo is a collision guard on web/dist/index.html specifically, not a
whole-repo claim — a schema-only Go DTO change doesn't cross it. g2
notified before opening this PR.
@jerryfane
jerryfane merged commit 510fdc8 into main Jul 26, 2026
1 check passed
@jerryfane
jerryfane deleted the g3/1127-active-jobs-badge branch July 26, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant