| 1 | { |
| 2 | "status": "revision-3-worker-implemented", |
| 3 | "version": 1, |
| 4 | "scope": "One job per separately spawned Rust worker; shared binary codec. Process separation is not an OS sandbox.", |
| 5 | "frame": { |
| 6 | "magic": "ZAW1", |
| 7 | "header_bytes": 32, |
| 8 | "fields_le": [ |
| 9 | "magic[4]", |
| 10 | "version:u16=1", |
| 11 | "kind:u16", |
| 12 | "body_bytes:u32", |
| 13 | "reserved:u32=0", |
| 14 | "job_id:u64(nonzero)", |
| 15 | "sequence:u64" |
| 16 | ], |
| 17 | "sequence": "Independent direction counters start0 and increase exactly once; reject duplicates, gaps and wrap.", |
| 18 | "max_body_bytes": 1048576, |
| 19 | "max_frames_per_job": 1000000, |
| 20 | "payload": "Fixed enum tags and LE integers; length-prefix byte/string/vector values with allocation bounds; reject unknown tags and trailing fields." |
| 21 | }, |
| 22 | "paths": { |
| 23 | "unix": "tag1 and exact native bytes", |
| 24 | "windows": "tag2 and UTF-16LE units", |
| 25 | "rules": "Platform encoding must match. Reject NUL and nonabsolute roots; Windows UNC/device paths unsupported. No lossy execution paths.", |
| 26 | "archive_names": "Separate validated UTF-8 relative names; entry IDs are opaque ordinal u32, not paths." |
| 27 | }, |
| 28 | "commands": { |
| 29 | "Start": "Exactly once: List{archive}, Extract{archive,destination,selection:All|EntryIds{ids:[u32]},list_id:optional<ListId>,gzip_output_name:optional<UTF8>}, CreateZip{sources:[source_path,archive_name],output_file,method:Store|Deflate,encryption:None|Aes256}. App supplies job_id; caller can lower worker hard limits. Extract destination is always an absolute output directory. EntryIds requires list_id; All may supply list_id to bind extraction to a displayed list.", |
| 30 | "Password": "Matching outstanding challenge_id:u64 and max1024 UTF-8 bytes; never log, Debug, echo or persist secrets.", |
| 31 | "Cancel": "Matching header job_id and empty body; command header sequence identifies the request. See CancelAck. Request acceptance is separate from final outcome. EOF alone is not successful cancellation.", |
| 32 | "StartInteractive": "Kind 4, body identical to Start with action restricted to Extract. Exactly one initial Start or StartInteractive. Invalid non-Extract action is rejected by the shared encoder and decoder. Opt in to interactive regular-file conflicts; never retry through legacy Start or an older worker automatically. Worker runtime supports the agreed choices; client activation and native UI integration are verified separately.", |
| 33 | "ConflictReply": "Kind 5: challenge_id:u64, choice:ConflictChoice(u8), apply_to_remaining:bool. Match the one outstanding conflict challenge exactly once. Applying to remaining affects only later regular-file conflicts in this job.", |
| 34 | "StartGuarded": "Kind 6: GuardedStart{start:Start,ceiling:Limits,interactive:bool}. Start limits keep legacy maxima. ceiling.input must equal start.limits.input; ceiling.output and entries may increase up to 64 GiB and 200000. interactive is valid only for Extract. No resource expansion takes effect before a matching ResourceReply. New workers never emit guarded challenges for Start or StartInteractive; older workers reject kind 6 without fallback.", |
| 35 | "ResourceReply": "Kind 7: challenge_id:u64,scope:ResourceScope,allow:bool. Frame job_id and exact outstanding challenge_id/scope must match once. Reject premature, stale, duplicate and cross-kind replies as Protocol. False cancels the job without further processing." |
| 36 | }, |
| 37 | "events": { |
| 38 | "Accepted": "Action and capabilities; encryption capability is true for implemented ZipCrypto extraction and WinZip AES-256 extraction/creation.", |
| 39 | "Entry": "entry_id, name, kind File|Directory|Link|Other, declared sizes, encrypted; ordinal u32 IDs belong to this List job only until its ListEnd token and Completed Terminal are confirmed. Metadata only, no CRC success claim.", |
| 40 | "ListEnd": "entry_count:u32 and list_id:ListId for a complete listing. Entry IDs are deterministic zero-based ordinals in archive traversal order. App associates this token with this job entries only after Completed Terminal, both stream EOFs and successful child wait/exit.", |
| 41 | "PasswordRequired": "challenge_id, attempt and purpose Decrypt|Encrypt; no secret diagnostics.", |
| 42 | "Progress": "stage Scan|Read|Decode|Write|Verify|Commit, processed_bytes,total_bytes:optional,completed_entries; observational only.", |
| 43 | "Output": "entry_id:optional, relative_name, disposition Created|PartialRetained|Removed|CommitUncertain; only this job outputs.", |
| 44 | "Terminal": { |
| 45 | "outcome": "Completed|Failed|Cancelled", |
| 46 | "error": "None|Integrity|UnsupportedFormat|UnsupportedFeature|WrongPassword|UnsafePath|Conflict|Limit|Io|Protocol|Internal|SourceChanged|InvalidRequest|DiskFull", |
| 47 | "publication": "None|Partial|Complete|Uncertain", |
| 48 | "created_count": "u64", |
| 49 | "retained_partial_count": "u64", |
| 50 | "durability": "NotApplicable|Synced|Unconfirmed|Failed", |
| 51 | "cleanup": "Complete|Failed|Unconfirmed", |
| 52 | "detail": "Bounded local description, not a substitute for typed errors." |
| 53 | }, |
| 54 | "CancelAck": { |
| 55 | "request_sequence": "u64: echoed Cancel command header sequence; separate from this event header sequence.", |
| 56 | "status": "Requested|AlreadyRequested|TooLate|Finished", |
| 57 | "Requested": "Cancellation flag was latched for the first time before the job cancellation cutoff. Cooperative request acceptance; not a guarantee of Cancelled, no outputs or rollback.", |
| 58 | "AlreadyRequested": "Cancellation was already latched and the job can still observe it. The flag stays latched; no second request or reset.", |
| 59 | "TooLate": "Final job completion/commit decision has been sealed so cancellation can no longer influence the outcome; final outcome may still be Failed or publication Uncertain. Previously created entries alone do not make a multi-entry job TooLate.", |
| 60 | "Finished": "Business outcome has already been fixed, but Terminal has not yet been emitted. Does not establish success, EOF, child exit or reaping.", |
| 61 | "ordering": "Each well-formed Cancel consumed before Terminal is acknowledged once before Terminal. Terminal is the last worker protocol frame. A Cancel racing with Terminal/exit may remain unread and have no acknowledgement; app uses Terminal plus EOF and wait, never synthesizes a worker acknowledgement or successful cancellation." |
| 62 | }, |
| 63 | "ConflictRequired": "Kind 108: challenge_id:u64, entry_id:u32, relative_name:UTF8, incoming_size:u64, existing_size:u64. One ordinary-file conflict at a time, after complete archive integrity validation. All three choices are permitted; links and file/directory type conflicts remain rejected.", |
| 64 | "ConflictResolved": "Kind 109: entry_id:u32, relative_name:UTF8, choice:ConflictChoice(u8). Emit for every resolved conflict, including automatically applied choices. This records the action and resolved name, not successful publication; successful overwrite or rename also requires Output Created. Skip emits no Output Created.", |
| 65 | "ResourceRequired": "Kind 110: challenge_id:u64,action:ActionKind,scope:ResourceScope,usage:ResourceUsage,soft_limits:Limits,ceiling:Limits. ResourceScope is output:bool,entries:bool,ratio:bool. ResourceUsage fields in order are estimated_bytes:Option<u64>,actual_bytes:Option<u64>,estimated_entries:Option<u32>,actual_entries:Option<u32>,compressed_bytes:Option<u64>,ratio_output_bytes:Option<u64>,available_bytes:Option<u64>. None is unknown, not zero." |
| 66 | }, |
| 67 | "lifecycle": [ |
| 68 | "Exactly one Start or StartInteractive; no automatic retry or fallback. Password/Cancel remain readable during work. ConflictReply is accepted only for a matching outstanding interactive conflict.", |
| 69 | "Parent drains both streams concurrently. Stdout is protocol only; stderr is bounded diagnostics without secrets.", |
| 70 | "Exactly one Terminal ends business results and is the final worker protocol frame; CancelAck can precede but never follow it. Worker exits0 after delivered terminal, including Failed/Cancelled. Malformed protocol or crash can exit nonzero without terminal.", |
| 71 | "App requires matching terminal, stdout/stderr EOF and owned child wait/exit before replacement/close. EOF/exit0 alone is not success.", |
| 72 | "Lost/killed worker preserves observed outputs; unobserved commit/cleanup stays uncertain, never synthetic Cancelled/rollback/absent output.", |
| 73 | "Cancellation retains completed outputs; cleanup removes only owned temporary files and reports any retained partial.", |
| 74 | "Completed is not OS sandboxing or release evidence. No security-setting changes." |
| 75 | ], |
| 76 | "safe_output": [ |
| 77 | "Reject absolute/dotdot/drive/UNC/device/reserved/alternate-stream names and case/path collisions before writes.", |
| 78 | "Reject archive links/special entries on extraction. Do not follow output parent symlinks/reparse points.", |
| 79 | "Legacy Start creates output files exclusively and never truncates or writes pre-existing files. StartInteractive may replace an existing ordinary file only after the agreed choice and complete temporary output validation. GZip FNAME does not choose destination.", |
| 80 | "CRC/size/stream-end validation precedes committed output events; preserve commit/durability/cleanup distinctions." |
| 81 | ], |
| 82 | "pending": [ |
| 83 | "Windows native runtime, forced interruption of blocked OS I/O and a current full dependency advisory audit are not verified." |
| 84 | ], |
| 85 | "crypto": { |
| 86 | "rustcrypto_allowed": true, |
| 87 | "approval_message_id": "2966b0ad-a3e0-49b8-aef8-fb51c4e1c5a5", |
| 88 | "implementation_verified": false, |
| 89 | "policy": "Human approved pure Rust RustCrypto under MIT/Apache. No home-grown AES or password KDF; approval alone does not enable encryption capability." |
| 90 | }, |
| 91 | "revision": 3, |
| 92 | "coordination": { |
| 93 | "frontend_message_id": "41a0e5a5-27d0-437f-805d-d39313082096", |
| 94 | "basis": "Revision 2 list identity, explicit raw GZip output naming and cancellation acknowledgement are implemented. Field order and tags remain unchanged.", |
| 95 | "streaming_frontend_message_id": "59142fd4-22d3-4dc5-a875-5347e1b054da", |
| 96 | "disk_full_frontend_message_id": "3b01f4c4-c9b4-4c72-a9a0-b3df39979ea1", |
| 97 | "conflict_frontend_message_ids": [ |
| 98 | "37815dda-3271-4f83-be4d-8da1a6e0c2ab", |
| 99 | "87ff39f9-f7fe-4efc-bd2e-d73ab3246356" |
| 100 | ], |
| 101 | "conflict_backend_message_id": "64e29128-e8a2-45e5-8577-db84a66feaa9", |
| 102 | "revision_3_status": "Joint agreement complete. Types, codec and interactive worker runtime implemented; frontend activation and native UI integration remain separate." |
| 103 | }, |
| 104 | "list_identity": { |
| 105 | "ListId": { |
| 106 | "catalog_version": "u16=1; reject unsupported versions without remapping entry IDs.", |
| 107 | "format": "ZIP|TAR|GZIP|TAR_GZIP; detected parser mode, not the filename extension.", |
| 108 | "source_object": "Tagged native identity from the opened source handle: Unix{device:u64,inode:u64} or Windows{volume_serial:u64,file_id:[u8;16]}. Platform must match; unavailable reliable identity returns UnsupportedFeature.", |
| 109 | "archive_bytes": "u64: exact complete compressed/source byte length, bounded by worker limits.", |
| 110 | "archive_sha256": "[u8;32]: SHA-256 of every source byte, using the permitted RustCrypto implementation; not CRC or path/size/mtime alone." |
| 111 | }, |
| 112 | "capture": [ |
| 113 | "Open the regular source file once and keep its handle. Copy through bounded reads into a private job-owned snapshot while computing full SHA-256. Check source handle identity, length and modification metadata before/after capture; detected mutation rejects the capture. Check the named source still resolves to the same object at the validation boundary.", |
| 114 | "The completed private snapshot is the sole input to parsing and decoding for this job; never hash one file and later reopen the path to decode. Snapshot storage is bounded, exclusively owned and not writable through attacker-selected names. Failure to establish a stable private snapshot fails before creating destination outputs.", |
| 115 | "List builds the deterministic catalog from that snapshot and returns its ListId only with successful ListEnd. A failed/cancelled/truncated listing provides no reusable selection token." |
| 116 | ], |
| 117 | "extract_validation": [ |
| 118 | "Treat every supplied ListId and entry ID as untrusted. EntryIds without ListId, empty/duplicate IDs or IDs outside the recomputed catalog fail InvalidRequest before destination output creation.", |
| 119 | "Capture the Extract source into a new private snapshot, recompute identity/length/SHA-256/format/catalog version and compare every ListId field before creating any destination output. A mismatch returns Terminal Failed/SourceChanged with publication None and zero created/retained outputs. The app invalidates the displayed selection and asks the user to reopen/list; no automatic extraction retry or ordinal remapping.", |
| 120 | "When All supplies ListId, apply the same comparison. All without ListId means extract the current captured archive without claiming it matches any earlier listing.", |
| 121 | "EntryIds refer to the recomputed catalog ordinals, never names supplied by the app; extract the selected members in archive traversal order. Link/special-entry and output path guards remain mandatory after identity validation." |
| 122 | ], |
| 123 | "boundary": "This binds extraction to verified snapshot bytes and observed native identity at capture/validation time. It is not authorization, a signed token, an exclusive filesystem lock or a promise to detect every external edit after capture or a byte-identical change-and-restore. Later source changes cannot change the bytes decoded from the private snapshot." |
| 124 | }, |
| 125 | "gzip_output": { |
| 126 | "destination": "Always the output directory, never a full output filename.", |
| 127 | "gzip_output_name": "Required Some(nonempty validated UTF-8 single leaf filename) for raw GZIP extraction, for both All and EntryIds. Reject absolute/drive/UNC/device/alternate-stream/reserved names, separators, dot/dotdot and invalid leaf names before creating outputs. Missing/invalid value returns InvalidRequest; no implicit basename or FNAME fallback.", |
| 128 | "other_formats": "Must be None for ZIP, TAR and TAR_GZIP; reject Some as InvalidRequest rather than silently ignoring it. TAR_GZIP uses validated inner TAR member names.", |
| 129 | "gzip_catalog": "Raw GZIP is one logical stream entry with entry_id0. Its listed display name is not an output path; entry selection still requires ListId.", |
| 130 | "publication": "Resolve the supplied leaf under destination using the same no-follow guards. Existing destination files return Conflict for legacy Start. StartInteractive follows the regular-file conflict policy; never automatically downgrade or retry through legacy Start." |
| 131 | }, |
| 132 | "design_references": [ |
| 133 | { |
| 134 | "url": "https://docs.rs/sha2/latest/sha2/", |
| 135 | "purpose": "RustCrypto SHA-256 implementation documentation; dependency version and advisories still require selection-time verification." |
| 136 | }, |
| 137 | { |
| 138 | "url": "https://learn.microsoft.com/en-us/windows/win32/api/winbase/ns-winbase-file_id_info", |
| 139 | "purpose": "Native Windows opened-file identity fields." |
| 140 | }, |
| 141 | { |
| 142 | "url": "https://man7.org/linux/man-pages/man2/stat.2.html", |
| 143 | "purpose": "Source metadata from the open file descriptor rather than a later path reopen." |
| 144 | } |
| 145 | ], |
| 146 | "format_tags": { |
| 147 | "Zip": 0, |
| 148 | "Tar": 1, |
| 149 | "Gzip": 2, |
| 150 | "TarGzip": 3, |
| 151 | "SevenZip": 4 |
| 152 | }, |
| 153 | "seven_zip_extension": { |
| 154 | "agreement_message_id": "5a36fd89-af36-42be-9f79-bca39415e84d", |
| 155 | "compatibility": "Existing format values 0 through 3, fields, message tags and frame version stay unchanged. Older clients reject format 4. App Format and bidirectional conversion require an update.", |
| 156 | "regression": "Preserve existing format bytes and round-trip SevenZip in ListEnd/ListId." |
| 157 | }, |
| 158 | "streaming_limits": { |
| 159 | "agreement": "Revision 2 fields and frame encoding unchanged. Ratio-rejection removal and advisory disk-space checks follow manager decision d6bc0d37-89d1-4cd2-a00b-883b5eb23ec0. DiskFull tag 13 and preserving Io tag 8 for query/access failures were agreed with frontend in message 3b01f4c4-c9b4-4c72-a9a0-b3df39979ea1. The 7z/CreateZip streaming extension follows manager task c4acbf18-0845-49a2-ae10-a92e7934042d; this extension was agreed with frontend in message 81b585cb-84be-494d-a953-1c8220300176 (PR 78 review 5864130366). Existing numeric quotas, frame fields and error tags remain unchanged.", |
| 160 | "default_input_bytes": 18446744073709551615, |
| 161 | "default_output_bytes": 17179869184, |
| 162 | "default_entries": 10000, |
| 163 | "lower_limits": "Callers can lower the input, output and entry quotas. input=u64::MAX means no input-size quota; resource and duration checks still apply.", |
| 164 | "zip_ratio": "No compression-ratio rejection. Validate declared and actual output sizes, stream end, CRC and HMAC; sum of declared output sizes must fit output quota before decoding.", |
| 165 | "gzip_ratio": "No compression-ratio rejection, including concatenated members. Aggregate decoded bytes, including TAR headers/padding, cannot exceed output quota.", |
| 166 | "tar_ratio": "Plain TAR copies declared nonoverlapping ranges within the captured input. The sum of file sizes cannot exceed output quota.", |
| 167 | "arithmetic": "Checked u64 offsets and totals; free-space block-to-byte conversion uses u128 to avoid multiplication overflow.", |
| 168 | "memory_target": "ZIP/TAR/GZ/TAR.GZ/7z List/Extract and ZIP creation: worker process peak RSS <=64 MiB in Linux regression with independently generated 1 GiB payloads. This is a measured target, not an OS-enforced RSS cap. The 64 MiB RSS regression target uses the default 8 MiB metadata policy; approved expanded metadata jobs may use more RSS.", |
| 169 | "staging": "64 KiB buffers; immutable input capture and verified decoded content use private temporary files that are removed on last-handle close. No decoded content is published until the entire catalog and integrity checks succeed. Temporary disk usage can include the archive plus expanded content plus current destination temporary file; disk exhaustion fails with DiskFull and closes/removes unpublished data.", |
| 170 | "legacy": "The slice parser keeps 64 MiB input /128 MiB output caps; the slice ZIP builder keeps 128 MiB source/result caps. Runtime 7z and ZIP creation use streaming file paths.", |
| 171 | "parent_lifetime": "Capture native parent before reading Start. At decode/read/write/password checkpoints, fail Io if parent is gone; close anonymous staging and remove current unpublished destination temp. stdin EOF alone remains valid for one-shot requests. Already published entries and directories are reported and retained. A blocked OS file operation cannot be forcibly interrupted by this cooperative guard.", |
| 172 | "disk_space": "Advisory free-space checks use opened Linux x86_64 filesystem handles (fstatvfs) or the Windows handle-derived directory (GetDiskFreeSpaceExW). Legacy Start groups remaining staging and selected output logical bytes by volume before ZIP/7z decoding and before publication. StartInteractive checks required staging before choices, then checks only the current non-skipped output at its resolved name immediately before publication; do not charge undecided or skipped files to the destination. For GZip with unknown expanded size, check staging space before each decoded chunk, then preflight selected output. Input capture also checks its snapshot space. Insufficient space returns DiskFull tag 13. Query failure and other I/O errors retain Io tag 8. Checks do not reserve space or account for every metadata/block-allocation overhead; later ENOSPC still closes staging and removes current unpublished output.", |
| 173 | "remaining_risk": "High compression ratios within 16 GiB may expand fully onto disk. Resource duration, cooperative cancellation and measured memory target remain. Free-space checks can race with other disk users; already published outputs are retained on failure.", |
| 174 | "seven_zip": "Copy, LZMA and LZMA2 use file-backed solid output with checked declared/actual output totals. Encoded headers are limited to the active metadata policy: 8 MiB before a valid resource grant, 64 MiB after it. Dictionary size remains at most 64 MiB; only the last 8 MiB is cached in memory and older dictionary bytes are read from the temporary output.", |
| 175 | "create_zip": "The sum of source logical bytes cannot exceed min(input,output) quotas. output defaults to 16 GiB of uncompressed source content; ZIP container/encryption overhead may exceed that logical content quota. Capture one immutable source at a time, stream Store/Deflate and optional AES-256 through 64 KiB buffers, then publish the completed ZIP without replacing existing files. Emit ZIP64 sizes/offsets only when their 32-bit fields would overflow or equal the sentinel. Check staging and destination free space; StorageFull maps to DiskFull tag 13 and other I/O failures retain Io tag 8." |
| 176 | }, |
| 177 | "validation": "Implementation results belong in the PR verification record. No OS sandbox or native Windows execution claim.", |
| 178 | "error_tags": { |
| 179 | "None": 0, |
| 180 | "Integrity": 1, |
| 181 | "UnsupportedFormat": 2, |
| 182 | "UnsupportedFeature": 3, |
| 183 | "WrongPassword": 4, |
| 184 | "UnsafePath": 5, |
| 185 | "Conflict": 6, |
| 186 | "Limit": 7, |
| 187 | "Io": 8, |
| 188 | "Protocol": 9, |
| 189 | "Internal": 10, |
| 190 | "SourceChanged": 11, |
| 191 | "InvalidRequest": 12, |
| 192 | "DiskFull": 13 |
| 193 | }, |
| 194 | "disk_full_extension": { |
| 195 | "agreement_message_id": "3b01f4c4-c9b4-4c72-a9a0-b3df39979ea1", |
| 196 | "compatibility": "Existing error tags 0 through 12, fields, message tags, revision 2 and frame version stay unchanged. Older clients reject error 13; app error mapping and worker must be updated together before integration.", |
| 197 | "mapping": "Insufficient preflight space and StorageFull I/O failures return DiskFull 13. Windows ERROR_HANDLE_DISK_FULL 39 and ERROR_DISK_FULL 112 also map to DiskFull. Query failure, permission errors and other I/O failures return Io 8. No error classification by localized detail text.", |
| 198 | "detail": "디스크 여유 공간이 부족합니다. 공간을 확보한 뒤 다시 시도하세요", |
| 199 | "publication": "Keep existing publication, durability and cleanup semantics. DiskFull does not imply rollback or absence of previously published outputs." |
| 200 | }, |
| 201 | "create_zip_sources": { |
| 202 | "agreement": "Proposed semantic extension under manager task 82093f56-73b7-4be4-ba6d-2597ffc2c6f7; frontend joint agreement is pending. Revision 2 fields, encoding, numeric quotas and error tags are unchanged.", |
| 203 | "roots": "Each source may be a regular file or directory. archive_name names that root inside the ZIP; directory descendants retain relative paths and every directory, including empty directories, gets a trailing-slash ZIP entry.", |
| 204 | "links": "Reject the whole job with UnsafePath for symbolic links, Windows reparse points, special files or unsafe/non-UTF-8 descendant names. Do not skip entries or follow external links. Open each path component without following links; enumerate pinned directories.", |
| 205 | "limits": "All expanded file and directory entries count toward entries (default 10000). Only file logical bytes count toward min(input,output), default output 16 GiB. Keep 64-component names and the active metadata budget. Legacy/unapproved plans retain 8 MiB and 32768 nodes; resource-approved plans use 64 MiB and 262144 nodes. In approved source plans, path and pending-name copies consume bytes but share their entry node. Validate the complete plan and case-insensitive/path-prefix conflicts before requesting a password.", |
| 206 | "consistency": "Capture each file from its validated open handle. Compare planned object identity, kind, size and modification time before capture and check planned objects again before publishing the completed ZIP; detected changes fail SourceChanged. This is not an atomic snapshot of an entire directory tree.", |
| 207 | "encryption": "AES-256 protects file contents using the existing AE-2 encoding. Directory entries are stored as zero-byte unencrypted directory records; entry names remain visible, as with other ZIP entries." |
| 208 | }, |
| 209 | "conflict_choice_tags": { |
| 210 | "Overwrite": 0, |
| 211 | "Skip": 1, |
| 212 | "Rename": 2 |
| 213 | }, |
| 214 | "extract_conflicts": { |
| 215 | "status": "worker-implemented", |
| 216 | "compatibility": "Preserve frame version 1, every existing message kind, field order and enum tag. Add StartInteractive=4, ConflictReply=5, ConflictRequired=108 and ConflictResolved=109. Older workers reject kind 4 before output. Do not automatically retry, overwrite or fall back.", |
| 217 | "legacy": "Start keeps its existing abort-on-conflict behavior. List and CreateZip never accept interactive conflict mode. Existing limits, source identity, integrity checks and path guards remain mandatory.", |
| 218 | "scope": "Only ordinary-file/ordinary-file collisions. Merge existing directories as before; reject file/directory type collisions, symbolic links, reparse points and other special entries. Complete integrity validation of the entire catalog precedes conflict questions and destination publication.", |
| 219 | "rename": "Worker selects an unused numbered sibling in the same directory under the validated output root. The app never supplies an arbitrary replacement path. Revalidate the chosen destination before publication. Avoid all selected archive output paths and prior generated names. Preserve UTF-8 boundaries when shortening a leaf to 255 bytes; try at most 10000 numbered candidates.", |
| 220 | "wait": "At most one outstanding conflict or password challenge. Reject premature, stale or duplicate replies with Protocol. Cancel remains readable during a conflict wait. EOF without a reply fails Protocol; the existing 300-second job duration includes waits.", |
| 221 | "apply_to_remaining": "Keep the chosen policy only for the remaining ordinary-file conflicts in this job. Emit ConflictResolved for every such entry even without another question. Never carry the policy to another job or a file/directory or link collision.", |
| 222 | "events": "ConflictResolved reports an action and resolved relative name, not storage success. For overwrite and rename, Output Created separately confirms publication; skip has no Created output. On later errors preserve publication, durability and cleanup distinctions.", |
| 223 | "overwrite": "Write, verify, sync and close a new owned temporary file in the destination directory before replacing the existing ordinary file. A pre-replacement failure preserves the original. After replacement, report actual publication and durability; do not claim whole-job rollback.", |
| 224 | "counts": "created_count includes published replacement files and newly created files/directories; excludes skipped files. If all files are skipped and no new directory or other output is created, finish Completed/None with created_count=0 and Durability NotApplicable. Newly created directories retain their Output events and actual counts even if all files are skipped.", |
| 225 | "implementation_boundary": "Worker supports StartInteractive extraction. Frontend activation and native Windows/Wayland integration require separate verification. Existing Start remains exclusive and aborts on file conflicts.", |
| 226 | "target_revalidation": "Before replacement compare parent and file native identities, size and modification time with the question-time observation. Detected changes fail Conflict. This is not atomic compare-and-replace against concurrent writes by the same account.", |
| 227 | "disk_space": "Required input capture and complete integrity staging checks remain before conflict questions. Defer destination space checks until the current choice is resolved. Skip has no destination byte charge; overwrite, rename and non-conflicting files are checked immediately before their publication. Preserve legacy Start aggregate preflight, limits, per-write checks and partial-output reporting." |
| 228 | }, |
| 229 | "guarded_resources": { |
| 230 | "status": "worker-implemented; wire handoff confirmed, frontend activation pending", |
| 231 | "agreement": "Frontend flow agreement 6fe5a494-7d5a-4bda-a7d3-831fb43e9238 and manager policy b3a743d2-10de-495c-8fdb-ecf2a5f3b453. Frame version 1, revision 3 messages and enum tags remain unchanged; this is an explicit opt-in extension.", |
| 232 | "admission": "After Accepted, request the output and/or entries scopes that ceiling increases above Start limits before capturing input or planning sources. Usage estimates and actuals are unknown at this point; report current staging-volume free space. The caller must show the requested ceilings and unknown values, not invent estimates. An earlier confirmation is needed because input capture itself can exceed 300 seconds. Each granted scope is confined to this job.", |
| 233 | "ratio": "Request ratio scope separately when expanded bytes are at least 256 MiB and strictly exceed compressed bytes times 1000. Check ZIP members and aggregate payload totals, 7z solid folders and totals, and complete compressed TAR/GZip streams. Use u128 arithmetic; unknown compressed length does not become zero. No ratio warning for legacy requests.", |
| 234 | "accounting": "Monitor declared catalog sums and counts, real decoded bytes, per-stream ratios and source-plan sums. Decoders must match verified declared lengths before publication. For compressed TAR/GZip the expanded stream includes headers/padding. ZIP creation ceiling counts source logical bytes; ZIP/container/encryption overhead is separately space-checked.", |
| 235 | "disk": "Continue staging/destination volume preflight and per-chunk space checks after approval. available_bytes is advisory free space on the current observation storage volume, not a reservation or all-volume total. Unknown storage is None. Preserve DiskFull, partial publication, durability and cleanup semantics.", |
| 236 | "waiting": "One resource, password or conflict challenge at a time. Pause processing while waiting; control reader remains live for Cancel. Response EOF fails Protocol. Guarded challenge wait is limited to 300 seconds per question; reset the inactivity clock after a valid reply, excluding the human wait.", |
| 237 | "time": "Legacy and unapproved jobs retain their whole-job 300-second deadline. After the first resource grant, use a 60-second inactivity deadline measured only from actual read/decode/write/metadata progress, not repeated cancellation checks or outgoing heartbeats. Cooperative checkpoints cannot forcibly interrupt a blocked OS call.", |
| 238 | "hard_ceiling": "Output/source bytes <=64 GiB and entries<=200000, including after approval. Caller may lower both ceilings for normal operation or scaled tests. Input quota cannot be expanded. Existing path, metadata, dictionary, frame and source-identity limits remain independent.", |
| 239 | "metadata": "Only after a valid ResourceReply(allow=true) for this job, select 64 MiB MetadataBudget and 262144 nodes, including ZIP/TAR/7z parsing, decoded 7z headers, XZ index/block bounds, member/path validation, implicit output parents and source planning. Legacy Start/StartInteractive, unapproved guarded jobs and slice APIs keep 8 MiB and 32768 nodes. Merely requesting expanded ceilings does not grant a larger budget. Names and source paths still consume checked byte budgets and implicit parents consume nodes, so long/deep paths can hit the metadata cap before 200000 entries. Approved source-path/pending-name copies consume bytes without duplicating their entry node. Expanded metadata jobs do not retain a universal 64 MiB RSS target. Frontend activation remains pending.", |
| 240 | "tests": "Use numeric 16/64 GiB and 10000/200000 policy boundaries, scaled worker limits, a compressed 257 MiB zero stream, and a virtual clock for the 60-second stall. Do not write 64 GiB in tests." |
| 241 | } |
| 242 | } |