Skip to content

SP-1173: extend CUI marking to exported archives - #411

Open
Dennis Woditsch (dwoditsch) wants to merge 4 commits into
feat/SP-1173-cui-marking-output-to-json-filefrom
feat/SP-1173-cui-marking-zip-exports
Open

SP-1173: extend CUI marking to exported archives#411
Dennis Woditsch (dwoditsch) wants to merge 4 commits into
feat/SP-1173-cui-marking-output-to-json-filefrom
feat/SP-1173-cui-marking-zip-exports

Conversation

@dwoditsch

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

Copy link
Copy Markdown

Description

Stacked on #410, which finished the -o, --outputToJsonFile row. This PR marks the exports whose artifact is already a single zip: the cover sheet goes into the archive the command produced, not into a new one wrapped around it.

That settles the "already a zip" question #405 left open, so only the directory row stays undecided.

Scope: how the write is triggered

Trigger Commands CUI marking
--json listings and reports list spaces, list packages Done in #405, together with the marking mechanism
--json listings and reports list assets/assignments/data-pools, config *, t2tc package list/diff, deployment *, asset-registry * Done in #407
-o, --outputToJsonFile reports analyze/import action-flows, export data-pool, import data-pools, t2tc package import report Done in #410
artifact is already an archive config package export --zip, config branch export --zip, t2tc package export, export action-flows, pull package This PR
single non-archive export pull asset/skill/data-pool/view-bookmarks/bookmarks, export bookmarks To follow in #412
output is a directory config package export, config branch export, t2tc package export --unzip To follow in #413: cover sheet into the directory, prefix the directory name
--gitBranch variants config package export, config branch export, t2tc package export Out of scope, nothing reaches local disk
no output flag console-only listings, profile/git-profile/log files Out of scope

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

…chives

writeToFileWithGivenName serializes a payload into a fresh archive, which
would nest a zip inside a zip for commands whose artifact is already one.
writeZipToFileWithGivenName takes the archive bytes instead and adds the
cover sheet alongside the existing entries, keeping the same three
outcomes: original name, "Unclassified - " prefix, or "CUI - <name>.zip".

Includes-AI-Code: true
Co-authored-by: Cursor <cursoragent@cursor.com>
Route the five writers whose artifact is a single zip through
writeZipToFileWithGivenName: config package export --zip, config branch
export --zip, t2tc package export, export action-flows and the
deprecated pull package.

writeLocalArtifact, downloadZip and BaseManager.pullFile become async so
they can await the marking decision; pullFile drops its Promise wrapper
for plain async/await. writeStreamToFile also picks up the
resolve(process.cwd(), ...) it was missing, matching every other writer.

Includes-AI-Code: true
Co-authored-by: Cursor <cursoragent@cursor.com>
One case per archive writer, asserting the logged name is the classified
archive and that it holds the original entries plus the cover sheet.

Includes-AI-Code: true
Co-authored-by: Cursor <cursoragent@cursor.com>
@dwoditsch
Dennis Woditsch (dwoditsch) force-pushed the feat/SP-1173-cui-marking-zip-exports branch from 9b1567c to 4496b86 Compare August 10, 2026 12:14
Both entry points repeated the cover fetch and the unmarked and
unclassified branches, differing only in the classified outcome.
writeWithCoverHandling owns the decision and takes that outcome as a
callback; writePayload picks the fileService method for the payload it
is given and returns the name it wrote.

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

Copy link
Copy Markdown

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.

3 participants