team-ljyzipelo

공개
81줄9.7 KB
1{
2 "schema_version": 1,
3 "scope": "Synchronous app boundary calling three real owned-memory modules via path dependencies. No GUI/model dependency, worker, filesystem, publishing, tar.gz chaining or process supervision.",
4 "api": {
5 "start": "Operation::start() -> Result<(Operation, Cancellation), AdapterFailure>; consumes a process-local monotonic non-reused ID. Operation is not Clone and each run method consumes self.",
6 "gzip": "Operation::gzip<E>(gzip::Request, &mut gzip::Budget, FnMut(Event<gzip::Checkpoint>) -> Result<(), gzip::Stop<E>>) -> Terminal<gzip::Completed, gzip::Error<E>>",
7 "ustar": "Operation::ustar<E>(ustar::Request, FnOnce(&[ustar::Entry]) -> Result<Vec<String>, E>, FnMut(Event<ustar::Checkpoint>) -> Result<(), ustar::Stop>) -> Terminal<ustar::Completed, ustar::Error<E>>",
8 "zip": "Operation::create_zip(zip_create::Request, FnMut(Event<zip_create::Checkpoint>) -> Result<(), zip_create::Stop>) -> Terminal<Vec<u8>, zip_create::Failure>",
9 "exports": "Re-export native gzip, ustar, zip_create crates, Request/Limits/Usage/checkpoint/error types without reinterpretation.",
10 "receiver": "Receiver::new(operation.id()); progress(&Event), terminal(&Terminal) -> Result<Delivery, DeliveryError>. Check before applying UI changes or taking payload.",
11 "memory": "Terminal::into_result() transfers Result<MemoryValidated<T>, Failure<E>>; success has private constructor and exposes native value by borrow or ownership transfer."
12 },
13 "identity": {
14 "scope": "Unique within one linked library instance/process lifetime, not persisted identity or authentication. IDs 1..u64::MAX-1, exhaustion returns OperationIdExhausted, never wraps or reuses. No worker/job ID conversion.",
15 "new_work": "Create a fresh Operation, Cancellation and Receiver. Old handles remain bound to old operation and cannot cancel a new one. Caller explicitly chooses the current Receiver.",
16 "concurrency": "Caller may move Operation to its own thread and retain Cancellation; adapter creates no thread, channel, executor or queue. Callback delivery/backpressure and integration are caller-owned."
17 },
18 "events": {
19 "stamp": "Private stamp contains OperationId and sequence, starting at zero per operation. Each delivered checkpoint consumes one sequence; returned Terminal consumes the next position, including no-checkpoint native errors.",
20 "overflow": "Reserve u64::MAX for Terminal. At exhausted sequence, do not call observer; record SequenceExhausted and return native Stop::Cancelled to stop work. Terminal retains native failure and secondary adapter cause; drop any success payload if adapter fault exists. This is an explicit transport limit, not a format Budget.",
21 "receiver": "Ignore other operation IDs before checking sequence or closed/faulted state. Current duplicate/reversal/gap fails and latches Faulted. After terminal reject current progress/duplicate terminal. Do not silently reset on mismatch.",
22 "receiver_failure": "Receiver error is an app delivery error, not a format error or cleanup proof. Caller should separately request cancellation and handle the actual terminal; rebuilding a receiver for the same operation to hide a gap is outside the contract.",
23 "stages": "Event contains the exact native Checkpoint, including USTAR pass/selection, ZIP validate/write/seek/finish, GZip stage and cumulative Usage. No synthetic terminal callback before native return.",
24 "delivery": "Observer receives events synchronously and may forward them. Receiver validates ordering only, not forged metadata or external authentication. Event mutation by consumer is not evidence of backend activity."
25 },
26 "progress": {
27 "all_totals": "None; no derived percentage or inferred work total. 100% never establishes completion.",
28 "gzip": "GzipCumulativeProcessedBytes from native checkpoint.usage.processed; includes prior calls on same Budget, input supply/read-ahead and actual output, including failures. Native usage snapshot also retained.",
29 "ustar": "UstarInputOffset { pass } and UstarEntryIndex { pass } are cursor/index observations with original checkpoint timing, not cross-pass cumulative bytes or completed item counts. Native Completed.usage remains authoritative.",
30 "zip": "ZipInputOffset { entry } is the original before-input checkpoint offset; ZipOutputExtent is the existing buffer extent before the pending write, not successful pending bytes. Seek/rewrite are not added as new output. No native final Usage exists; do not fabricate one.",
31 "comparison": "Metrics and phases are distinct; never compare them as one shared processed counter."
32 },
33 "control": {
34 "request": "Cancellation::request() is monotonic/idempotent and reports whether it set the flag first. It is a request, not an actual cancellation result.",
35 "poll_order": "At an existing native checkpoint, allocate event stamp and invoke the native-typed observer first. Observer Err is returned unchanged. Only observer Ok is followed by polling the request flag and returning native Stop::Cancelled. No extra checks before entering or after returning from the native module.",
36 "priority": "Preserve native request validation, pre/post callback deadline checks, GZip failed-output charging/backend precedence, USTAR selection-error immediate return and ZIP sticky first Failure. Budget stays Budget; do not infer Deadline.",
37 "snapshot": "Terminal cancellation_requested is a snapshot at return construction; cancellation_forwarded means this handle was observed and converted to Stop::Cancelled at a checkpoint. Neither overrides actual native result. Explicit observer cancellation may yield Cancelled with forwarded=false.",
38 "late_request": "A request after the final checkpoint can coexist with success. A request after terminal creation does not mutate that terminal. Native errors before a checkpoint may coexist with requested=true and forwarded=false.",
39 "limits": "Cooperative only. No preemption or all-panic/OOM recovery. Callback time remains included in native timing. A panic may produce no Terminal."
40 },
41 "result": {
42 "only_success": "MemoryValidated means native operation returned successfully under the identified frozen policy; no additional round-trip validation is claimed for ZIP creation. Only private adapter code constructs this wrapper.",
43 "failure": "No Completed payload. Failure.native owns the exact returned typed error; Failure.adapter independently preserves sequence faults, never overwriting native cause.",
44 "origin": "Terminal policy identifies the frozen implementation mapping in sources.json: GzipSingleMemberV1, UstarLinuxV1, ZipAsciiCreateV1.",
45 "limits_preserved": [
46 "GZip exact single member/EOF, unselected full decode, caller-shared Budget retained across retries",
47 "USTAR Linux raw UTF-8 policy, Windows Unsupported, exact string IDs and ContentVerification::Unavailable retained in Completed",
48 "ZIP existing ASCII name policy and already-coarsened Failure::Engine retained; underlying backend details cannot be recovered by the adapter"
49 ],
50 "callback_types": "GZip original Stop::Callback(E) -> Error::Callback(E); USTAR select E -> Error::Selection(E). ZIP/USTAR checkpoint APIs only support Cancelled/Deadline, not arbitrary E; observer signature reflects that limitation.",
51 "no_promotion": "No ProtocolObserved, Published, mock PR39 type, OS receipt or external cleanup evidence. ProcessCleanup::NotApplicable means no process resource was created by this adapter; it does not claim every upstream allocation/Drop/panic is recovered."
52 },
53 "dependency_policy": {
54 "direct": "Three existing path libraries only. All 42 registry package records match the union of original locks. Linux selected 29 package feature sets equal original selected union.",
55 "licenses": "Own code MIT; raw cache-matched third-party license bytes and hashes listed in dependencies.json/THIRD-PARTY-NOTICES.txt. Scope is Linux selected packages, not final all-platform distribution.",
56 "unchanged": "Original source/test/lock/manifest bytes preserved. No source include or production copy into adapter, no new codec/crypto or external package."
57 },
58 "validation": {
59 "rust_toolchain": "1.99.1",
60 "target": "x86_64-unknown-linux-gnu",
61 "build": "locked/offline --lib, exit 0, final build without warnings",
62 "format": "rustfmt check required on adapter only",
63 "originals": "60 imported source/test blobs compared to fixed GitHub trees before and after build",
64 "runtime": "No adapter regression or original regression rerun. Existing module results belong to their original heads only.",
65 "not_claimed": [
66 "Independent execution",
67 "GUI, Windows or product acceptance",
68 "Advisory freshness or vulnerability-free dependencies",
69 "Dynamic overflow coverage; ID/sequence exhaustion branches have no public injection API"
70 ]
71 },
72 "next_regressions": [
73 "Real small synthetic GZip/USTAR/ZIP calls, matching native payload and typed failures",
74 "Native callback error/selection E identity, Budget vs Deadline and shared GZip retry accumulation",
75 "Pre-requested cancellation, callback error precedence, cancel from callback, late cancellation retaining success/error",
76 "Event exact sequence, no-checkpoint native error terminal zero, new operation stale progress/terminal ignored",
77 "Receiver duplicates/gaps/reversal/post-terminal rejection without payload application",
78 "Native policy/Usage/ContentVerification preservation, no protocol/publishing promotion",
79 "Source imports and full dependency lock/feature provenance"
80 ]
81}