feat: group ↔ campus assignment + deliberate group field coverage (#21) - #43
Merged
Merged
Conversation
Add campusId to the group's managedFields, read from information.campusId (with top-level fallback) and normalised to null when unset, mirroring how groupTypeId/groupStatusId are wired. The executor already writes it the field-agnostic way (top-level campusId on PATCH). The DSL passes a numeric campusId through as a plain field and now rejects a logical `campus: "key"` reference (deferred to #20) and a non-numeric campusId. Document why an additive managed field needs no state migration (unlike shortName->shorty).
…drift (#21) - registry: managedFields snapshots campusId (nested/top-level), normalises unset to null, preserves campus id 0. - context: numeric campusId passes through; logical campus + non-numeric rejected. - plan: assign/change/clear campus as normal field updates; no-op when matching; no spurious diff for a pre-#21 snapshot lacking campusId. - execute: campus assignment PATCHes a top-level { campusId }. - adopt: a campus-assigned group captures campusId from information.
- New docs/group-field-decisions.md: managed/opt-in/out-of-scope triage of group fields with rationale, the information.campusId GET/PATCH shape, and the no-migration reasoning. - runbook: move group<->campus assignment out of 'not yet implemented' (managed now); same-run campus link deferred to #20; decision-table row marked shipped; add campusId to the #20 hardcoded-ids list. - README + blueprints.md + campus-blueprint example: show numeric campusId and note the same-run reference is #20's job.
Emitting campusId: null would actively manage 'no campus' — a later UI-assigned campus would be planned back to null. Omission leaves the field unmanaged, matching the adopt philosophy. Flagged by the PR #43 review.
This was referenced Jul 9, 2026
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.
Implements #21 per the instance-readiness roadmap:
campusIdbecomes a managed group field with a numeric escape hatch now; same-run campus references (a blueprint assigning a group to its own new campus) are explicitly deferred to #20's resolver and documented as such.What's in
campusIdin groupmanagedFields, read via theinformation.*nested-with-fallback pattern and written top-level on PATCH — mirroringgroupTypeIdexactly. Unset campus normalizes tonull(assign/change/clear all diff concretely; campus id0survives).campus: "key"reference is rejected with a pointer to feat: portable configs — logical references instead of numeric CT ids (shared resolver) #20; non-numericcampusIdrejected — no silently un-diffed phantom fields.migrateStateand locked by a no-phantom-drift test.docs/group-field-decisions.md: the deliberate coverage table — managed (name,groupTypeId,groupStatusId,campusId), opt-in synthetic (parents,dynamic), out-of-scope with rationale (visibility,note,autoAccept, chat, sort key).Known live-unverifiable assumption
PATCH acceptance of top-level
campusIdmirrors the already-workinggroupTypeIdpath but wasn't verified against a live instance — flagged for the #23 bootstrap smoke test.Verification: 282 passed / 4 skipped, typecheck + lint clean.
Closes #21.