Skip to content

polish(channels): tighten P4 submit-service contract (405 READ + EDIT/REMOVE target guard) - #2158

Merged
jung-thomas merged 1 commit into
DEVfrom
channels-p4-polish
Sep 4, 2026
Merged

polish(channels): tighten P4 submit-service contract (405 READ + EDIT/REMOVE target guard)#2158
jung-thomas merged 1 commit into
DEVfrom
channels-p4-polish

Conversation

@jung-thomas

Copy link
Copy Markdown
Contributor

P4 follow-up — tighten submit-service contract

Optional polish parked from the P4 (#2157) whole-branch final review. Two precision improvements on the ChannelSubmissionService insert-only submit path; no model change, no migration.

Changes

  1. Insert-only READ assertion tightenedtest/channel-submission-service.test.js previously accepted expect.any(Number) for the READ-blocked case (would silently pass a 500). Now asserts the exact CAP-10 contract: 405 Method Not Allowed. Confirmed empirically, not assumed.
  2. EDIT/REMOVE target guard at submit timebefore('CREATE') now rejects an EDIT/REMOVE submission with no targetChannel_ID with 400 and target targetChannel_ID, instead of accepting a junk PENDING row that only fails later at approve. Defense-in-depth behind the island's client-side required field; ADD (no target) is unaffected.

Verification

  • channel-submission-service.test.js: 5 passed (405 READ + two new 400 guard tests + existing anon-401/stamp tests).
  • Related suites unchanged: admin-channel-submissions, channel-submissions-model, admin-channel-submissions-app16 passed.
  • .cds untouched → no .hdbmigrationtable/csn regen.

Draft — targets DEV per branching policy. Not deployed.

@jung-thomas
jung-thomas marked this pull request as ready for review September 4, 2026 23:03
@jung-thomas
jung-thomas merged commit e70a3c3 into DEV Sep 4, 2026
4 checks passed
@jung-thomas
jung-thomas deleted the channels-p4-polish branch September 4, 2026 23:03
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