Skip to content

SP-1173: decide CUI marking from the cover response status - #414

Open
Dennis Woditsch (dwoditsch) wants to merge 3 commits into
feat/SP-1173-cui-marking-directory-exportsfrom
feat/SP-1173-cui-cover-response-semantics
Open

SP-1173: decide CUI marking from the cover response status#414
Dennis Woditsch (dwoditsch) wants to merge 3 commits into
feat/SP-1173-cui-marking-directory-exportsfrom
feat/SP-1173-cui-cover-response-semantics

Conversation

@dwoditsch

@dwoditsch Dennis Woditsch (dwoditsch) commented Aug 12, 2026

Copy link
Copy Markdown

Description

Stacked on #413.

The CUI cover call now decides the outcome by status code only. resolvedCuiMarking.categories is no longer read anywhere, so a team that has CUI on but no matching categories gets an Unclassified - … artifact through the 204 path instead of an unmarked one.

Cover response Outcome Example (list packages --json)
403 — feature flag disabled Unmarked, unchanged packages.json
204 Unclassified Unclassified - packages.json
200 Classified + PDF cover CUI - packages.zip containing packages.json and CUI_Cover_Sheet.pdf
Anything else, or a 200 without a usable cover page Command errors, nothing written

What changed against the previous behaviour:

Cover response Before After
403 Unmarked Unmarked (unchanged)
204 Unmarked Unclassified
200 Unclassified without categories, classified with them Always classified + PDF cover

CuiApi returns a disabled / unclassified / classified decision instead of a nullable cover body, and CuiFileService switches on it. isClassified and every category check are gone. Failures still fail closed: the command errors and no artifact is left behind.

docs/cui-marking.md is updated to the three status rows.

Relevant links

Checklist

  • I have self-reviewed this PR
  • I have tested the change and proved that it works in different scenarios
  • I have updated docs if needed

Made with Cursor

The cover response categories no longer take part in the decision: 403
leaves the artifact untouched, 204 marks it Unclassified, and 200 marks
it CUI and attaches the cover sheet. Anything else fails the command
without writing output.

Includes-AI-Code: true
Co-authored-by: Cursor <cursoragent@cursor.com>
Unclassified is now reached through 204 and classified through 200, so
the specs drop the category fixtures. The shared mock answers 403 so
unrelated tests keep their original filenames.

Includes-AI-Code: true
Co-authored-by: Cursor <cursoragent@cursor.com>
The command specs only exercised classified writes, so the 204 branch
was reached by the unit spec alone. Each artifact shape now has an
unclassified case, and a failing cover call is asserted to abort the
command without producing a file.

Includes-AI-Code: true
Co-authored-by: Cursor <cursoragent@cursor.com>
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
78.3% Coverage on New Code (required ≥ 85%)

See analysis details on SonarQube Cloud

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