Contributor Workflow Conventions
- GitLab labels (scoped taxonomy)
- Merging: CI and the merge train
- Phased issues (scope growth found in review)
- Work-list ordering — don’t re-triage
- Tiers, themes and the burn-down
- The board snapshot (
cargo xtask board, #1327) - Documentation drift — the surfaces to sweep
- Bundle doc flips with the implementing MR
- Guarding push and merge under gadhs/pi
- Cutting a release (#3016)
- CHANGELOG entries from concurrent MRs (#3150)
- A policy change: a configuration merge request, then a pin bump
- Working agreements local to canopy
For a contributor or delivery agent opening an issue or an MR against canopy: this page carries only what is specific to how this project’s GitLab group and CI are operated. The universal git, MR and delivery rules live in the standards (Git Workflow, GitLab Workflow, Delivery Protocol); where this page overrides one of them it says so. Setup and commands live in Local Development and Developer Guide.
GitLab labels (scoped taxonomy)
Canopy uses GitLab scoped labels at the group level (gadhs/application/eligibility), which GitLab keeps mutually exclusive per scope. They supersede the flat starter labels of the universal GitLab Workflow standard. Every issue and MR carries exactly one type::, exactly one priority::, at least one program:: or service::, a workflow:: for its current state, and a planning:: once triaged.
| Scope | Labels | Purpose |
|---|---|---|
|
feature, bug, chore, spike, compliance, documentation, security |
What kind of work |
|
critical, high, medium, low |
Urgency and scheduling |
|
snap, tanf, medicaid, chip, caps, wic, cross-program, infrastructure |
The benefit program — one per issue; |
|
rules, persons, applications, eligibility, verification, enrollment, renewals, notices, exchange, appeals, reporting, security, web, portal, snap, tanf, medicaid, caps, wic, shared-crates, devstack, ci, seed, xtask |
The primary service the change lands in — exactly one. Multi-service work is expressed by |
|
ready, in-progress, in-review, blocked, needs-spec |
Execution state; |
|
needs-plan, has-plan, trivial |
Plan readiness, orthogonal to |
|
pub-1075, irs-pub-1075-audit, hipaa, cma, ievs, wcag-21-aa |
Governing compliance framework |
|
cms, fns, acf |
Which federal partner is implicated |
add_labels with a second value of an already-present scope replaces the first silently. Set the primary service:: once; when several compliance frameworks or partners apply, label the governing one and name the others in the description.
Merging: CI and the merge train
CI is the gate. git push runs cargo xtask test --unit (fmt, clippy and the unit lane) and git-lfs, nothing else (What git push runs); GitLab's reject_unsigned_commits push rule refuses an unsigned commit. An MR lands only through the merge train, and the train's pipeline on the dhs-aws-autoscaler-docker-4xlarge runner runs the whole battery against the MR merged onto the train ahead of it; that pipeline owns correctness (its jobs are in CI vs local). The MR's own pipeline runs only lint, antora and docs (the pre-push hook already ran fmt, clippy and the unit lane), with the car job manual, so it finishes in minutes and the MR joins the train; start it by hand for an early answer. The car is one job running the developer's commands: the precompilation lints, one compile and cargo xtask dev start, then every lane against that stack (#3354). A red car leaves the train, and its flake or failure gets a root cause: nothing retries. Nothing else is asked of anyone locally: cargo xtask validate and the other cargo xtask commands stay tools a developer may run by hand, never a step before pushing or merging.
The docs-only path (#3275). The car and docs run only when the change touches a code input: the .code-inputs list in .gitlab-ci.yml, which is the images' inputs (.artifact-inputs) plus tests/, the compose files, .config/, compliance/, devstack/ and every root Dockerfile*. A change outside it (under docs/, CHANGELOG.adoc, AGENTS.md, .gitlab/) runs lint (the .lints block: every precompilation gate, the plan, SPDX and docs gates among them) and antora (the site builds) and nothing else, on its MR pipeline and on its car, so a docs-only car is two jobs instead of the full battery; the train still gates its merge. A change touching docs and code runs everything. After a train merge, main's own pipeline compiles one thing, the operator CLI alone, which canopy-cli keeps for a week as a job artifact (#3634; Getting the binary): its car built and tested that tree, so beyond that main runs pages and GitLab's security scans; tags and schedules run the car. The release job (#3355) promotes the images: after the car on a tag or a schedule, and on main only when someone runs it by hand, so a merge to main promotes no image by itself. ci-config-lint refuses a job that needs the car without its changes: *code-inputs on each rule, so a skipped car schedules nothing after it.
-
A pipeline result and its artifacts (JUnit,
test-results/validate-report.json) are the evidence a change works. A local run is the developer's own diagnostic. -
After a local
cargo xtask validate, the failing stage and its captured output are intest-results/validate-report.json(schema, #1253), not in the battery log. That report is validate-only;git ls-remoteis the only proof a push landed.
Merge mechanics:
-
Squash stays off: a regular merge commit keeps authorship and the signature (Git Workflow).
-
Land an MR by adding it to the merge train (
auto_merge); a direct merge is refused, since pipelines must succeed:glab api projects/<PROJECT>/merge_requests/<N>/merge -X PUT \ -F auto_merge=true -F squash=false -F should_remove_source_branch=true -
The project settings that make the train the gate (#3249), set through the API, and the call that undoes them:
glab api projects/<PROJECT> -X PUT -F merge_pipelines_enabled=true -F merge_trains_enabled=true \ -F only_allow_merge_if_pipeline_succeeds=true -F allow_merge_on_skipped_pipeline=false \ -F merge_trains_skip_train_allowed=false glab api projects/<PROJECT>/push_rule -X PUT -F reject_unsigned_commits=true # undo: glab api projects/<PROJECT> -X PUT -F merge_trains_enabled=false -F merge_pipelines_enabled=false \ -F only_allow_merge_if_pipeline_succeeds=false -
Never
[skip ci]in a commit subject: it suppresses the pipeline that is the gate. -
GITLAB_TOKENlives in the gitignored.env.localand is not auto-sourced by fish:export GITLAB_TOKEN=$(grep -E '^GITLAB_TOKEN=' .env.local | cut -d= -f2-)before anyglabcall. -
Never
--no-verify.
Phased issues (scope growth found in review)
When review uncovers scope growth mid-flight — work beyond the issue’s acceptance criteria — neither expand the MR silently nor close the issue silently:
-
Ship Phase 1 with
Relates to #NNNin the MR (notCloses #NNN). -
Comment on the issue with the phased acceptance criteria — what Phase 1 delivered, what remains.
-
Leave the issue open until the remaining phases land.
Phasing never splits the issue’s own acceptance criteria: Phase 1 closes every criterion the issue carried when work began, completely and with no interim posture (no fig leaves). Only the growth review added is phased.
Work-list ordering — don’t re-triage
For work-list, backlog or "what next" requests, use the existing priority:: labels as they stand and order by dependency chains (what unblocks what). The priorities were set deliberately; re-triaging them silently discards that judgment. Named, line-numbered correctness and security bugs outrank structural and epic work.
Tiers, themes and the burn-down
Every open issue carries exactly one tier milestone and one epic.
-
Tier — the T1–T5 milestone is the burn order (T1 correctness, T2 completeness, T3 upkeep, T4 externally blocked, T5 new features). Each milestone has a start date and a target due date, so GitLab draws its burn-down chart. The target is a planning aid: move it when the plan moves, rather than reading it as a commitment.
-
Epic — a stream epic when the issue belongs to one, else its theme epic directly. The ten theme epics (&160–&169: SNAP; Medicaid and CHIP; TANF, WIC and CAPS; the cross-program platform; worker and applicant experience; partner exchange; security and identity; jurisdiction configuration; delivery; federal reporting) parent every stream epic, so an epic’s progress bar rolls up its whole theme.
-
A new issue gets both when it is filed: the tier by its kind of work, the epic by its stream. A new stream epic is filed under its theme.
-
A finished epic, all of its issues and child epics closed, is closed with a note.
The global burn-down is then three native GitLab views: each tier milestone’s chart, the theme epics' roll-up, and cargo xtask board below for the per-tier counts against a baseline.
The board snapshot (cargo xtask board, #1327)
cargo xtask board is the tier-burndown snapshot for humans and for agent session preflight alike — never hand-assemble the state from ad-hoc listings. It renders the per-tier (T1–T5 milestone) open/closed counts with a delta against a machine-local baseline (--set-baseline stores one under .devstack/), the open-T1 roster, the T4 parked list with each issue’s would-be tier when a classification note records one (would-be T<n>), and the open MRs with their referenced issues; --json emits the machine form (xtask/src/cmd/board.rs). It reads GITLAB_TOKEN from the environment (read-only); a network failure is one clear error, never a partial table. Tiers are fetched unfiltered and counted from each issue’s own state, because milestone listings have returned stale results for a state= filter.
Documentation drift — the surfaces to sweep
After a session that lands several MRs back to back, the wider docs surface drifts even when the per-MR docs (CHANGELOG entries, plan-archive moves, regenerated OpenAPI snapshots, citations.toml) were kept in sync. Before answering "have you kept up on docs?" with yes, audit:
-
Roadmap — the Current Status narrative and the Open Work registers.
-
The per-service pages
api/canopy-.adocanddata-models/canopy-.adoc, plus the Service Catalog (per-service status, routes, tables, plan refs — the canonical home;AGENTS.mdonly points here). A new shared crate’s page is the easiest to forget. -
docs/modules/ROOT/nav.adoc— plan-archive moves and new pages leave dangling or missing links.
The Antora site is the canonical home for service, endpoint, table and API knowledge: feature MRs update Antora, not the thin AGENTS.md map, and they bundle the update into the implementing MR (next section) rather than an end-of-session cleanup pass.
Bundle doc flips with the implementing MR
When an implementation MR lands a plan deliverable, flip the plan’s Status in the same MR — not in a follow-up chore/plan-status-* MR — and, when it completes the plan, run cargo xtask plan-lint --done <plan>, set Done (YYYY-MM-DD) — !N, and move the plan’s nav entry to Archive in that MR too (the canonical vocabulary and completion gate are in Documentation (Canopy)). The same applies to any doc the change directly necessitates: the Service Catalog entry, a roadmap.adoc tick, the CHANGELOG line.
Why: a separate doc MR costs a second pipeline and a second merge for a projection of work the implementing MR already did; the diff belongs next to the change that justifies it. Exception: roadmap-level milestones that span many plans (a Phase A → Phase B transition) are worth a standalone docs: MR. Anti-pattern: opening chore/plan-status-mrN-done after merging the implementation.
Guarding push and merge under gadhs/pi
pi’s high-consequence list is empty by default (pi tuning.adoc › The high-consequence list), and its modes config is per user: $GADHS_PI_MODES_CONFIG, else ~/.pi/agent/gadhs-pi-modes.json, over the bundled defaults (pi modes.adoc). canopy ships no guard of its own (#2989), and the one repository file that could carry one is a poor fit. pi-permission-system does read a project config, <cwd>/.pi/extensions/pi-permission-system/config.json, but only once pi trusts the project (its README, "Project"). An ask rule in it is decided by pi-modes, through its mode rules or its model judge, so it is not necessarily a question for a human. Adding the file also makes canopy untrusted until someone runs /trust, because .pi/extensions/ is a trust-requiring resource, and .pi/ is gitignored, so the file would not reach other clones. Add this to your own overlay instead. A match is never refused; it becomes a question for you before the command runs:
{
"modes": [
{ "id": "auto",
"highConsequence": ["git push*", "git -* push*", "glab mr merge*", "*merge_requests/*merge*"] }
]
}
How the patterns match:
-
pi’s patterns are case-insensitive globs over the whole command, and
*spans anything (matchesPatternin@gadhs/pi-modes). Each command of a compound line is also tested with itsenv/timeoutwrapper stripped. -
git push*covers everygit push …, including one whose destination is implicit, andenv- ortimeout-prefixed pushes. A push already runs the unit lane, so one confirmation costs little. -
git -* push*covers a push behind git’s global options, such asgit -C <dir> pushorgit -c <key>=<value> push. It leaves outgit stash pushandgit log --grep=push. -
*merge_requests/*merge*covers the API merge in Merging: CI and the merge train, the…/merge -X PUT, and any othermerge_requestscall whose path containsmerge, such as…/cancel_merge_when_pipeline_succeeds -X POST. It also covers either call made throughcurl, or with anenvprefix.
main also accepts direct pushes from Maintainers, so the server does not stop a maintainer’s push.
Cutting a release (#3016)
A release is a versioned section in CHANGELOG.adoc and an annotated, signed git tag vX.Y.Z on the commit that cuts it. Container images float by decision (#2631), so a release retags no image and publishes no separate release-notes page. Versions follow pre-1.0 semantic versioning: a breaking contract change bumps the minor version.
When: cut once == Unreleased passes about 150 entries, or at a milestone, whichever comes first. Cut between MR waves: every open MR that touches CHANGELOG.adoc conflicts with the heading move, so announce the slot on canopy-dev and land the cut while nothing else is in flight.
One MR, chore(release): cut X.Y.Z, on a chore/release-X.Y.Z branch:
-
In
Cargo.toml, set[workspace.package] versiontoX.Y.Z, the version being released, and regenerate what records it:Cargo.lockand the OpenAPI snapshots underdocs/modules/ROOT/openapi/, whoseinfo.versionis the crate version. The tree states the version of the last release cut. Skip this step only when the version already readsX.Y.Z, as it did for 0.1.0. -
In
CHANGELOG.adoc, rename== Unreleasedto== X.Y.Z — YYYY-MM-DD. Merge its=== Security,=== Added,=== Changed,=== Fixedand=== Removedblocks into one block each, in that order, keeping each entry verbatim. Insert a fresh== Unreleasedabove it, with those five headings and no entries. -
Merge as usual (Merging: CI and the merge train).
-
Tag the merge’s cut commit, not the merge commit, so the tag’s tree is exactly the reviewed one:
git tag -s vX.Y.Z -m "canopy X.Y.Z" <cut commit>, thengit push origin vX.Y.Z. -
On the release issue, note the tag and the merge SHA.
The 0.1.0 cut (2026-11-01) merged the 90 drifted section blocks that had accumulated since 2026-03-25 into five, and folded the nonstandard Chore, Documentation and Added (Database Constraints) headings into Changed and Added.
CHANGELOG entries from concurrent MRs (#3150)
Every MR adds its release note under == Unreleased, so two MRs in flight at once both insert into the same === <Section> block. Without help, git reads two adjacent insertions as a conflict, the second MR goes unmergeable, and the rebase costs another full pipeline run for a one-line text collision.
-
merge=union..gitattributesdeclaresCHANGELOG.adoc merge=union, so a both-add of two entries merges as both, in a local merge or rebase and in GitLab’s server-side merge alike (Gitaly honours the attribute since GitLab 17.1, gitlab-org/gitaly#6193). The union keeps both sides of any conflicting hunk, so two edits of the same entry come through as two lines: an MR that edits an existing entry wants a look at the merged result. No gate readsCHANGELOG.adoc(the pre-commit hook only reminds you to stage it; the stray-backtick test walksdocs/modules/), so a duplicated or misplaced line passes every check until #3181’s fragment lint. -
Insertion point. When two contributors land concurrently, one inserts each new entry as the first bullet of its block and the other as the last; agree which on canopy-dev. Non-adjacent insertions merge cleanly even without the union, and keep the result in landing order.
-
After a release cut. An MR branched before a cut rebases its entry into the released
== X.Y.Zsection without any conflict, since its context lines still exist there (#3106 did, on 0.1.0). Move the entry under the new== Unreleasedbefore pushing; neither git nor the union flags it.
Per-change fragments assembled at each cut (#3181) retire all three once they land.
A policy change: a configuration merge request, then a pin bump
A value a jurisdiction sets, or a federal one, lives in its configuration repository (canopy-config-federal, canopy-config-georgia), not here (ADR-051). Changing one takes two merge requests:
-
In the configuration repository. A signed commit on a branch, rebased locally and merged fast-forward only. That repository's pipeline is basic lints: every JSON and TOML file parses, and gitleaks finds no secret in the history. The pipeline is
devstack/config-repo-ci/in this repository, copied to the configuration repository's root. -
Here, the pin bump.
cargo xtask config bump <name> <branch>moves the layer's pin inconfig-sources.lockto the branch's head and rewrites the devstack's default source list indocker-compose.ymlto match. Commit both files and open the merge request as usual. Its car fetches the new commit and runs the whole battery against it, which is where the change's meaning is tested.
The bump refuses, and writes nothing, when the remote has no such branch or the fetch refuses the head: an unsigned commit, or one signed by a key that is not in ci/config-trust/. A pin must be a commit on the branch its entry names; cargo xtask config fetch refuses any other, however it is signed.
Working agreements local to canopy
The universal agreements — never --no-verify, never dismiss a failure as transient, plan before implementing, scope growth becomes an issue, pre-existing bugs get their own fix: issue — are in the standards pages and gadhs/pi’s injected rules, and are not restated. These are canopy-local:
-
No fig leaves, no shortcuts. The MR closes the defect the issue names — this is the "no half-implementations" rule ADR-025 cites. None of these is delivery:
-
a cosmetic or partial fix;
-
documenting the gap instead of closing it — a known-issues row, a doc-comment, a CHANGELOG note, an
#[ignore = "…"]rationale, a test excused as a documented gap; -
warn-and-continue where a refusal (
Err, a 4xx/5xx, refuse-to-start) is right — the agency Rust profile’s no-silent-failure rule (propagate, log with reason, or comment why not) putstracing::warn!only on a failure the operation can genuinely proceed past, never a peer of refusing; -
a
sleep, retry, wider timeout or lowertest-threadsthat masks a race or contention (load is never the cause); -
an "interim" posture — an Accepted ADR that kept one (ADR-035’s household-level EE15 propagation) records a past decision, not precedent.
-
-
A deferral is legitimate only as YAGNI with a named trigger — the roadmap's Gated deferrals shape: a gating event plus an open owning issue — never to dodge work the issue asks for. Phased issues above phase scope growth found in review, not the issue’s own acceptance criteria.
-
A SIGPIPE’d push is a transport failure, not a gate failure. When the gate passed and the push exited 141 without transferring the branch, delete the partial remote branch and re-run the gated push so the hook fires again; never "finish the transfer" with
--no-verify. -
gadhs/pi reviews every agent commit (J1–J8 plus the
## Code Review RulesinAGENTS.md; Coding Conventions › Commit review). TheAGENTS.mdrules reach the reviewer only in a project pi trusts: canopy counts as trusted by default while it has no trust-requiring.pi/resource (.pi/settings.json,.pi/extensions/, …), and/trustmakes it explicit. To retry an unchanged diff after FLAGS, answer each flagged question with aReview-Response:line, and keep the review’s detail for the user, out of MR descriptions. -
Screenshot a visible UI change (light and dark) before calling it done. Markup tests assert structure, not styling — an unstyled-but-present element passes every
.contains(..)assertion. Reproduce server-side error states by stopping the upstream service (recipe in Troubleshooting › Contributor gotchas). -
Intermittent is not "flake". Before touching a timeout, dispatch independent investigators across disjoint hypotheses (code-path race, shared state, test-framework race) without feeding them a theory; convergent findings are the root cause.