Repository navigation
feat(org): add OrgBadges.ActiveJobs schema field (#1127) - #135
Merged
Merged
Conversation
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.
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
Schema-only half of gitmoot#1127: a role whose herdr seat goes idle while its
dispatched workers (attributed via
ActingOrgRole, gitmoot#1114) are stillqueued/running currently reads as plain "idle" on the org page — nothing
distinguishes "truly nothing happening" from "seat quiet, lane busy".
OrgBadges.ActiveJobs int(json:"active_jobs,omitempty") — the livecount of jobs currently queued or running, attributed to the role.
OrgRoleActivity.JobsToday(asame-UTC-day job-outcome histogram used by
OrgRoleView) — the newfield's doc comment names this distinction explicitly so a future reader
doesn't collapse the two:
ActiveJobsanswers "is the lane busy rightnow",
JobsTodayanswers "what happened today".web/is untouched, nothing under it changed.job/workflow store. A follow-up
gitmoot/gitmootPR populates the field(via the existing
ActingOrgRole-derived job-count query already usedinternally for recycle status) and bumps this repo's pin in
go.mod, pergitmoot-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 concurrentlywould 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'sgo 1.23directive — the plaingo1.23bare-toolchain auto-download isbroken in this sandbox, unrelated to this change)
go vet ./...go test ./...— greenTestOrgBadgesActiveJobsAdditiveJSONContract— legacypayload without
active_jobsunmarshals cleanly and the zero valueomits the key on marshal (byte-exact against the legacy shape,
matching this file's existing
TestWorkflowAdditiveJSONContractshouse 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.
datasource.goanddatasource_test.gochanged.
🤖 Generated with Claude Code