Skip to content

Service edit form: a checkbox for forward_role (156) - #157

Merged
jerryfane merged 1 commit into
mainfrom
feat/forward-role-checkbox
Nov 15, 2026
Merged

jerryfane merged 1 commit into
mainfrom
feat/forward-role-checkbox

Conversation

@jerryfane

Copy link
Copy Markdown
Contributor

Closes 156. Follow-up to #151: to turn on forward_role for macserve-builds the owner had to paste settings, and the paste box starts empty, so every other setting (base, project, test path, fixed headers) had to be retyped or was lost.

Change

  • Edit form: checkbox "Tell the service which agent is calling (sends X-Keyring-Role; …)", ticked when on.
  • The form owns the field like its others: ticked sets/keeps it, unticked clears it. Pasted settings still set it (paste wins, as for fixed headers). The edit audit already lists forward_role when it changes.
  • README sentence.

Behaviour change vs #151: a form submit without the box now clears forward_role (normal checkbox semantics; the form renders it ticked when on, so a browser edit keeps it). TestForwardRoleSetByPasteKeptByFormEdit asserted the old "form edit keeps it without the field" rule; renamed TestForwardRoleSetByPasteOrCheckbox and updated to: page shows it ticked; ticked keeps; unticked clears; ticking sets.

Evidence

  • Updated test above; full race suite green.

Turning forward_role on needed pasted settings, which replace every field the
paste names or omits. The edit form now has 'Tell the service which agent is
calling'; the form owns it like its other fields (ticked keeps or sets it,
unticked clears it); pasted settings still set it.
@jerryfane

Copy link
Copy Markdown
Contributor Author

test-check prove: TestForwardRoleSetByPasteOrCheckbox proven (red on old). TestServiceProjectFromTheDashboard not_red_on_old: untouched test, listed only because it shares the edited file.

@jerryfane
jerryfane merged commit 78e5f48 into main Nov 15, 2026
3 checks passed
@jerryfane
jerryfane deleted the feat/forward-role-checkbox branch November 15, 2026 18:10
@jerryfane

Copy link
Copy Markdown
Contributor Author

Reviewer: adspower-fleet-review
Runtime: omp
Job: local-review-review-router-18e84bced3e45624-1

Decision: approved
Summary: Reviewed all four changed files at exact head 3dcaf3f. No introduced correctness or design findings; no prior PR #157 findings recorded. Checkbox rendering, persistence, upstream forwarding, clearing, and rejected-save isolation passed. A pasted-settings retry failure also reproduced against the parent and is excluded as pre-existing. Sandbox permissions prevented cgo/race execution; exact-head CI covers race tests.

Tests Run

  • go build ./... -> failed: cgo compiler denied access to /usr/include/stdc-predef.h
  • CGO_ENABLED=0 go build ./... -> passed
  • CGO_ENABLED=0 go vet ./... -> passed
  • test -z "$(gofmt -l internal/dashboard/pages.go internal/dashboard/services.go internal/dashboard/services_test.go)" -> passed
  • CGO_ENABLED=0 go test ./internal/dashboard ./internal/server ./internal/policy -count=1 -> all three packages passed
  • CGO_ENABLED=0 go test -overlay=/proc/1530565/fd/4 ./internal/dashboard -run ^TestReview -count=1 -v -> independent checkbox forwarding/persistence probe passed; pasted-settings validation-retry probe failed in both directions; overlay existed only in memory
  • CGO_ENABLED=0 go test -overlay=/proc/1590785/fd/6 ./internal/dashboard -run ^TestReviewParentPastedRoleValidationRetry$ -count=1 -v -> same retry failures reproduced with parent production files, confirming pre-existing behavior
  • CI-verified: go test -race ./... -count=1 -> success; run 43745006572 job 132906260104

Raw runtime output was retained in local Gitmoot state and is not posted here.

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