lycheedev 3.0.2 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/THIRD_PARTY_NOTICES +27 -0
  2. package/native/windows-amd64/lycheedev.exe +0 -0
  3. package/package.json +1 -1
  4. package/payload/addon/Bridge/InputProtection.lua +18 -5
  5. package/payload/addon/Bridge/InputState.lua +25 -11
  6. package/payload/addon/Bridge/MemoryProtocol.lua +2 -2
  7. package/payload/addon/Bridge/ReceiverBindings.lua +85 -16
  8. package/payload/addon/Bridge/SlotProtocol.lua +48 -4
  9. package/payload/addon/Bridge/SlotRuntime.lua +63 -10
  10. package/payload/addon/Core/Controls.lua +6 -1
  11. package/payload/addon/Core/Locale.lua +7 -0
  12. package/payload/addon/Core/Locale_enUS.lua +7 -0
  13. package/payload/addon/Core/Runtime.lua +1 -1
  14. package/payload/addon/Lychee Dev.toc +1 -1
  15. package/payload/skill/SKILL.md +73 -75
  16. package/payload/skill/agents/openai.yaml +2 -2
  17. package/payload/skill/references/addon-validation.md +33 -9
  18. package/payload/skill/references/asset-export.md +37 -4
  19. package/payload/skill/references/commands.md +7 -3
  20. package/payload/skill/references/data-hotfix.md +13 -0
  21. package/payload/skill/references/data-investigation.md +9 -0
  22. package/payload/skill/references/data-query-recipes.md +19 -0
  23. package/payload/skill/references/data-recovery.md +12 -0
  24. package/payload/skill/references/data-tables.md +21 -1
  25. package/payload/skill/references/data-targets.md +4 -0
  26. package/payload/skill/references/error-diagnosis.md +33 -2
  27. package/payload/skill/references/installation.md +34 -15
  28. package/payload/skill/references/live-investigation.md +79 -82
  29. package/payload/skill/references/live-probes.md +34 -9
  30. package/payload/skill/references/live-recovery.md +62 -21
  31. package/payload/skill/references/live-startup.md +27 -14
  32. package/payload/skill/references/runtime-investigations.md +23 -4
  33. package/payload/skill/references/source-preparation.md +4 -1
  34. package/payload/skill/references/source-relations.md +14 -0
  35. package/payload/skill/references/source-research.md +30 -0
  36. package/payload/skill/references/source-value-flow.md +19 -0
  37. package/release.json +71 -71
@@ -36,6 +36,11 @@ product; use returned candidates only when selection remains ambiguous.
36
36
 
37
37
  ## 3. Query the smallest useful scope
38
38
 
39
+ Decide what would settle the requested claim before expanding the query. One
40
+ verified record or relationship can answer an ID-specific question; a negative
41
+ claim needs complete readable coverage of its exact filters. Prepare only the
42
+ tables needed for that claim, rather than exporting a whole build as a precaution.
43
+
39
44
  - Verified ID: prefer the domain command that owns the needed relationship;
40
45
  otherwise inspect table schema and query the ID or foreign key.
41
46
  - Business name only: inspect the relevant name table schema, search its actual
@@ -64,6 +69,10 @@ source, record IDs, filters and capture IDs with the conclusion.
64
69
  | Failure/deadline | [data-recovery.md](data-recovery.md); correct the cause or stop the affected branch after bounded retry |
65
70
 
66
71
  For JSONL, require a legal end frame and exit 0, then inspect coverage separately.
72
+ Keep query completion, source readability and output truncation separate: a
73
+ complete bounded query can still use a partial table or intentionally return
74
+ only its SQL LIMIT. Retain the captures needed to reproduce the finding, not
75
+ just a successful exit code.
67
76
  `db2 search` and `foreign-key` have no cursor: narrow to the requested scope,
68
77
  increase the limit within documented bounds, or use ordered SQL pagination.
69
78
  Do not invent `--after-id` for those verbs. With SQL, retain a stable unique order
@@ -15,6 +15,12 @@ An exact ID equality can use the shared DB2 identity index. Missing-key tables
15
15
  remain partial even when the query returns one row or no rows. Use direct DB2
16
16
  lookup when the distinction between an encrypted ID and absence is the question.
17
17
 
18
+ For a bounded listing, use `ORDER BY ID LIMIT 50`; continue with
19
+ `WHERE ID > :after ORDER BY ID LIMIT 50` and the last returned ID. Keep the pin,
20
+ source and other filters fixed. For joins with repeated IDs, order and continue
21
+ on a unique tuple from the actual result; using ID alone can skip tied rows.
22
+ An aggregate over missing-key tables describes only the readable subset.
23
+
18
24
  ## Discover a flag and query it
19
25
 
20
26
  First find its pinned definition:
@@ -58,6 +64,19 @@ The derived query capture is reproducible local-cache evidence, not proof of
58
64
  complete server or running-client state. Base missing-key coverage remains
59
65
  partial conservatively, even if a Hotfix supplies a particular missing row.
60
66
 
67
+ The example starts from static membership: it exposes a deletion as a missing
68
+ effective join row, but cannot find an ID added only by Hotfix. Query
69
+ `effective.TableName` directly when effective membership is the question, and
70
+ compare against static separately when additions matter. A NULL field alone
71
+ does not distinguish a deleted row from a surviving row with that NULL value;
72
+ include the joined row ID and provenance needed for that distinction.
73
+
74
+ The query accepts 1–16 raw cache captures with at most 128 MiB combined raw
75
+ content. Their shared snapshots are verified and scanned once per query;
76
+ page/scan captures and remote provider summaries cannot replace the raw bytes.
77
+ Reordering captures changes tie resolution, so retain their ordered IDs with
78
+ the query document and result capture.
79
+
61
80
  ## Diagnose expensive or invalid queries
62
81
 
63
82
  Prefix the query with `EXPLAIN` to bind and inspect its shape without scanning
@@ -43,6 +43,18 @@ a failure in one layer does not establish failure in another.
43
43
  preparation cost justifies it, make one deliberate budget extension with
44
44
  `--timeout-seconds <1-3600>` within the task budget. A second deadline stops that
45
45
  branch; do not keep raising budgets. Hotfix uses its own scan/request bounds.
46
+ - Shared resource budget (`records.query_resource_budget`): inspect the failing
47
+ dimension and narrow the required tables, relationships or source work.
48
+ Increasing `--timeout-seconds` or a per-file byte limit does not increase this
49
+ budget. If failure is in shared metadata preparation before row selection,
50
+ reducing `--limit`, using `--id` or narrowing WHERE cannot reduce that prerequisite.
51
+ Preserve the fixed pin and diagnose the charged structure; do not repeat those
52
+ variants or substitute another build. SQL `query.budget_exceeded` is a separate executor limit; use EXPLAIN
53
+ or a more selective query when it can preserve the requested claim.
54
+ - Workspace admission: heavy data reads wait for CLI-owned slots, with a
55
+ 30-second admission bound as well as the caller's deadline. Let competing
56
+ work finish and make one bounded retry when appropriate. Do not remove lease
57
+ files, kill another task or create another workspace to evade the bound.
46
58
  - Transient I/O: the CLI already owns mirrors and route refresh. Allow at most
47
59
  one unchanged retry within the task budget; repeated failure stops that branch
48
60
  until its cause changes. Never script a second CDN-routing layer or bypass
@@ -80,7 +80,11 @@ to 64 MiB, indexed physical/copy rows to one million, columns/partitions to 4096
80
80
  and decoded row text to 1 MiB. A page's serialized row array is capped at 8 MiB;
81
81
  any row failure or budget overflow returns no partial page. Page selection uses
82
82
  bounded extra memory, but each CLI invocation currently reopens the table and
83
- checks its selected source. Encrypted BLTE chunks use a pinned public TACT key
83
+ checks its selected source. Within one query, the CLI reuses verified table
84
+ views and storage metadata under the same fixed source; separate invocations
85
+ revalidate cached bytes and source identity. Do not build an agent-side decoded
86
+ table cache or bypass verification to make pagination faster.
87
+ Encrypted BLTE chunks use a pinned public TACT key
84
88
  snapshot, fetched only when needed and cached with a verified digest. Offline
85
89
  uses only cached keys. Supply `--key-file <WoW.txt|keys.json>` to use an explicit
86
90
  text or JSON key set instead; private keys stay in request memory.
@@ -98,6 +102,12 @@ require the complete verified file.
98
102
 
99
103
  ## Implemented static SQL
100
104
 
105
+ Prefer a single bounded SQL query for a relationship that needs several tables;
106
+ its CLI-owned session shares preparation without changing pin or source. Avoid
107
+ issuing many simultaneous queries to force parallel downloads. Heavy queries
108
+ share workspace admission (at most two ordinary queries; one when download
109
+ workers is configured to 1), and waiting can consume the command's deadline.
110
+
101
111
  For parameterized lookups, flags, explicit Hotfix overlays and query diagnostics,
102
112
  read [data-query-recipes.md](data-query-recipes.md). The `meta` catalog exposes
103
113
  pinned enum/flag definitions; `effective` requires explicitly selected raw cache
@@ -153,6 +163,16 @@ evidence. Budget failures yield no partial query result. Narrow the query when
153
163
  appropriate to the request; do not change the pinned build or imply full
154
164
  coverage from a narrower successful query.
155
165
 
166
+ These SQL limits sit alongside shared query-resource limits across preparation
167
+ and reading: 512 MiB retained/scratch reservation, 128 MiB metadata, 100 million
168
+ decode/work units, 4,096 network requests and 1 GiB response-body bytes.
169
+ Failed candidates consume work/network budget; a new table does not reset it.
170
+ `records.query_resource_budget` (exit 3) identifies this shared limit, distinct
171
+ from `query.budget_exceeded` in the SQL executor or `command.deadline`.
172
+ The returned resource counts are logical charges, not wire bytes, peak heap or
173
+ RSS. `--max-bytes` is a per-file bound, not a knob for raising these shared limits;
174
+ narrowing output alone may not reduce source preparation costs.
175
+
156
176
  SQL errors use `error.stage: query` with `query.invalid_syntax` or
157
177
  `query.unresolved_binding` (exit 2), `query.unsupported_expression` or
158
178
  `query.budget_exceeded` (exit 3), and type/range/cardinality faults (exit 4).
@@ -2,6 +2,10 @@
2
2
 
3
3
  Read when no matching fixed data pin exists, or when comparing local and remote delivery identities.
4
4
 
5
+ Resolution fixes identity; the first requested query establishes whether the
6
+ selected source can supply useful content. Do not perform a full archive
7
+ preparation or refresh a matching pin just to answer a narrow lookup.
8
+
5
9
  Start from the requested product and business entity, not a guessed archive path.
6
10
  Reuse the invoking project's fixed data pin when it matches the requested scope.
7
11
  `target list` lists saved named targets, not supported products or available data;
@@ -1,8 +1,11 @@
1
1
  # Error diagnosis
2
2
 
3
3
  Separate source facts, static data, live evidence and operation state before
4
- acting. Start with `live status` when an operation ID already exists; do not run
5
- another probe merely to recreate an error.
4
+ acting. When a native CON or pending request already exists, read `live status`
5
+ for that CON in its original project and follow its continuation before creating
6
+ another request. A failed probe can have a verified report and completed cleanup;
7
+ a host timeout can leave successful Lua still running. Neither is a reason to
8
+ recreate the error or change request keys.
6
9
 
7
10
  For an authorized snapshot of errors already retained by the addon provider:
8
11
 
@@ -20,6 +23,34 @@ Use a question-specific probe only when the retained error snapshot cannot
20
23
  distinguish the hypotheses. Follow [live-investigation.md](live-investigation.md)
21
24
  and keep sampling, output and async lifetime bounded.
22
25
 
26
+ Retain the provider's session, message, stack, occurrence counts and available
27
+ timing fields without inferring unavailable fields. Repeated provider rows may
28
+ aggregate occurrences; row count is not necessarily error count. Ordering is
29
+ reverse provider storage, not a newly sorted chronology. Retain `scope`,
30
+ `requestedCount`, `returnedCount`, `availableCount`, session and missing-field
31
+ markers. A count limit covers that retained slice, not every error since login.
32
+ Bind snapshot collection to the verified process/character/build and loaded
33
+ addon revision. Provider storage may include earlier sessions; do not attribute
34
+ every retained error to that current actor or revision. A stack path or currently
35
+ installed file alone does not establish the code that ran at the error's time.
36
+
37
+ Choose the next step from the evidence:
38
+
39
+ | Finding | Next useful action |
40
+ | --- | --- |
41
+ | Verified error with stack and reproduction conditions | Inspect the pinned source at that path and its callers; form a causal explanation before adding a probe. |
42
+ | Provider unavailable or partial snapshot | Preserve that coverage limit; use another authorized observation only if it answers the actual question. |
43
+ | Verified probe with `report.ok: false` | Read its error/assertion and logs; distinguish invalid preconditions from evidence against the hypothesis. |
44
+ | Submitted/uncertain input with no verified report | Continue the original CON/request via recovery; no conclusion about whether the effect ran. |
45
+ | Verified report with cleanup pending | Use the report, preserve pending closure and recover that same CON. |
46
+
47
+ A source stack identifies where an exception surfaced, not necessarily where the
48
+ bad value originated. Trace the value's acquisition, transformations and consumers
49
+ at the fixed source revision. State which observation would distinguish an API
50
+ change, a scene prerequisite failure or an addon-owned value-flow error. Test only
51
+ the remaining material distinction; do not repeatedly trigger a known forbidden
52
+ operation to gather more copies of its error.
53
+
23
54
  For secret-value or secure-taint errors, connect the relevant fixed source path
24
55
  to [live hypothesis testing](live-probes.md#test-source-hypotheses).
25
56
  Use runtime observations to distinguish the remaining source hypotheses, then
@@ -1,14 +1,18 @@
1
1
  # Installation tasks
2
2
 
3
- Read this reference only when the user explicitly asks to install, update, or
4
- remove Lychee Dev. First inspect the installed CLI's top-level and relevant
3
+ Read this for a requested installation/update/removal, or managed addon deployment
4
+ needed to complete an already authorized live task. That live authorization covers
5
+ the selected client's necessary deployment and activation; it does not imply a
6
+ global npm CLI update, updates to other clients or changing the selected release.
7
+ First inspect the installed CLI's top-level and relevant
5
8
  subcommand `--help`; use only the commands and flags it exposes. If `describe`
6
9
  is available, use it to confirm the supported capability. Do not substitute a
7
10
  legacy installer or claim a planned release command exists.
8
11
 
9
12
  ## Update the installed toolkit
10
13
 
11
- For npm installations with `update` in their installed command contract:
14
+ For an authorized npm update to the `latest` channel, with `update` in the
15
+ installed command contract:
12
16
 
13
17
  ```text
14
18
  lycheedev update --plan --format json
@@ -36,7 +40,16 @@ objects with `component` (`skill` or `addon`) and absolute `path`. It cannot be
36
40
  combined with the path selectors. An empty array intentionally updates only the
37
41
  npm CLI and bundled tools; it never discovers or deploys other targets.
38
42
 
39
- The npm launcher fetches one exact latest package into isolation, verifies it,
43
+ The npm launcher fetches `lycheedev@latest` into isolation and pins the exact
44
+ resolved package. This command has no version/channel selector: do not use it to
45
+ refresh a selected `next`, exact-version or development candidate. Keep that
46
+ selection and use its matching installed release root for payload deployment;
47
+ if CLI replacement is requested, use the explicitly chosen package/version through
48
+ the supported distribution route. Do not move registry tags to make an updater
49
+ select a candidate. Keep the owner's existing registry-channel policy separate
50
+ from installation; an update task is not a release-promotion request.
51
+
52
+ The launcher verifies the pinned package,
40
53
  checks all targets, replaces the CLI (including its bundled LuaLS), then applies
41
54
  that release's addon and Skill through native delivery. No running native process
42
55
  holds the old executable during npm replacement. Successful replacement removes
@@ -53,8 +66,9 @@ lycheedev update --release <distribution-root> --path <parent/lycheedev> --insta
53
66
  ```
54
67
 
55
68
  This verifies and applies that CLI version's payload; it does not self-replace
56
- the native executable or fetch npm. Older CLIs without `update` must first be
57
- upgraded using npm, then use the newly installed command. Do not call an
69
+ the native executable or fetch npm. Older CLIs without `update` need a supported
70
+ CLI upgrade only when an upgrade is in scope; select the requested release before
71
+ using its command. Do not call an
58
72
  unimplemented update command merely because the Skill documents it.
59
73
 
60
74
  `result.complete` confirms files and receipts. `activation: reload_required`
@@ -89,15 +103,20 @@ installation uses the lightweight TOC/XML/Lua checker and does not require Git
89
103
  or LuaLS on the target machine.
90
104
 
91
105
  Before updating a managed installation, finish current operations and disconnect
92
- your own native CON connections. The installer refuses unresolved host ownership;
93
- do not clear a foreign project's claim. Deploy through the managed installer,
94
- then activate the selected process using the startup workflow. All 200 slot-v2 files
95
- are part of the managed installation. An installed CLI or Skill does not update
96
- an already running client, and a disk-only result is not live readiness.
97
- Migration from the old 64-slot pool refuses unresolved reservations; recover
98
- them through their owning CON rather than deleting files. Existing 64-slot CONs can resume and clean up their original slots before
99
- migration; new connections require 200 slots. Old records retain their evidence
100
- and retirement value. With multiple
106
+ your own compatible native CON connections. The installer refuses unresolved
107
+ ownership; do not clear a foreign project's claim. Deploy through the managed
108
+ installer, then activate the selected process using the startup workflow. Native
109
+ 3.1 uses the named Mailbox, slot-v3 and 200 LoadOnDemand slot addons; all managed
110
+ files and receipts must match the selected CLI release. An installed CLI or Skill
111
+ does not update an already running client, and a disk-only result is not live
112
+ readiness.
113
+
114
+ An inert older managed installation can be replaced using its installation
115
+ receipt. This is filesystem migration, not protocol compatibility: the 3.1 driver
116
+ rejects old wire, native identities and channel-v1 journals, including 64-slot
117
+ connections. Preserve those records and unresolved reservations for recovery with
118
+ their matching older CLI in the owning task. Do not ask the new driver to resume
119
+ them, rewrite their schema or delete their claims to permit installation. With multiple
101
120
  instances, activate and verify each authorized PID after the shared installation
102
121
  is updated. If the runtime reports `restart_required` because newly installed
103
122
  slot folders are unavailable, retain that blocker and restart only within scope.
@@ -1,49 +1,47 @@
1
1
  # Live investigation
2
2
 
3
- Use live work to resolve a question about the running client that existing source,
4
- data or retained reports cannot answer. Keep those evidence types distinct: source
5
- explains possible behavior, data supplies versioned records, and a live observation
6
- establishes what happened on the selected client. Carry exact source/data pins into
7
- the experiment; a data build selection does not select a game process.
8
-
9
- 1. Existing CON: read status and retained results first. Resume unfinished work
10
- through [recovery](live-recovery.md). If it is idle and still matches the
11
- authorized target, reuse it for the next distinct task.
12
- 2. New live task without a CON: select and connect below. Read [startup](live-startup.md)
13
- only for installation, activation or contact without a usable runtime.
14
- 3. Need new evidence: use [probe design](live-probes.md), [retained errors](error-diagnosis.md)
15
- or [performance measurement](runtime-investigations.md) according to the question.
16
- 4. Inspect the verified report, finish cleanup, and disconnect when done.
17
-
18
- The CLI owns native input, memory/optical observation, slot coordination and
19
- recovery. Agents do not send keys, decode colors or manipulate slot/claim files.
20
- Keep the invoking project's `.lycheedev/live` evidence directory together.
3
+ Use this for evidence about the running client. Source describes possible
4
+ behavior; static data and Hotfix captures describe fixed records. A live
5
+ observation establishes what happened on its selected client and conditions.
6
+
7
+ Start with retained state: status/results for an existing CON, [recovery](live-recovery.md)
8
+ for unfinished work, or select/connect below for a new task. Reuse a matching
9
+ idle CON. Read [startup](live-startup.md) when activation or installation is needed.
10
+ Use [retained errors](error-diagnosis.md) or [performance measurement](runtime-investigations.md)
11
+ when they answer the question; write a [probe](live-probes.md) only for missing evidence.
12
+
13
+ Native 3.1 uses a build-bound Lua root and the named public Mailbox, with a
14
+ matching clean 200-slot installation. The CLI validates the current process,
15
+ typed path, publication, owner/fence, challenge and exact result. Old native
16
+ wire/identity is rejected. Unsupported code/layout, ambiguity or read gaps
17
+ fail closed; they do not invoke a heap scanner or reuse another build's RVA.
18
+ `--no-cache` follows this same path. Raw address research is a separate task.
21
19
 
22
20
  ## Select and connect
23
21
 
24
- Use `live instances --passive` for window inventory without input. Connect directly
25
- when installation/PID are known; never choose a different character to bypass a
26
- busy or unavailable target. The selected process creation identity and actor remain
27
- fixed throughout recovery. One process has one logical connection and one active
28
- CLI driver. Same-build instances still have separate PID/CON/request identities;
29
- shared installation files do not make them interchangeable. A foreign project's durable claim is not an expired timeout.
30
-
31
- If several candidates match and the task does not choose one, show their known
32
- product/build, character/realm and PID (unknown identity stays unknown), then ask
33
- which to connect. Do not pick the first process. When the user explicitly asks
34
- to test both instances, retain both fixed targets and proceed within that scope;
35
- there is no remaining selection question.
22
+ `live instances --passive` inventories targets without input or actor binding.
23
+ Reuse a supplied installation/PID or a uniquely matching target under the user's
24
+ scope. Match the verified executable path and process creation identity, not
25
+ just `Wow.exe`, a folder name or a shared build hash. If multiple targets remain
26
+ and the task does not choose them, present known product/build, actor/realm and
27
+ PID; unknown identity stays unknown. “Test both” or an established arbitrary-
28
+ character scope already resolves that choice within its stated limits.
36
29
 
37
30
  ```text
38
31
  lycheedev live connect --project <project-directory> --installation <client> --pid <pid> --character <name> --realm <realm> --wait-seconds 120 --format json
39
32
  ```
40
33
 
41
- Retain `result.session` (CON), identity, project and journal path. An optional
42
- `--snapshot` constrains the exact data build; source/data pinning is independent of
43
- connection storage. A fresh bind, not a cached address or an actor descriptor,
44
- authorizes work. `--no-cache` disables disposable address hints; invalid hints
45
- already fall back to a fresh scan. Read [startup](live-startup.md) when activation
46
- is pending or an installation was just updated.
34
+ Actor filters are useful when the task names a character. If it permits the
35
+ current character, use the supported selection without inventing a name and
36
+ retain the returned actor. Save `result.session`, project, journal, runtime,
37
+ installation and process/actor identity. A data `--snapshot` constrains data
38
+ context independently; it neither selects nor authenticates a running process.
39
+
40
+ One process has one durable connection owner and one active CLI driver. Each
41
+ same-build instance keeps its own CON/request and target; shared addon files
42
+ do not make them interchangeable. A fresh bind establishes runtime ownership;
43
+ execution remains within the authorized task. A foreign
44
+ project's claim, missing publication or stale sample is not an expired timeout.
47
45
 
48
46
  ## Complete an investigation
49
47
 
@@ -52,71 +50,70 @@ lycheedev live execute --project <project-directory> --session <CON-id> --file <
52
50
  ```
53
51
 
54
52
  Use `--probe <immutable-PRB-revision>` instead of a file for registered source.
55
- `--budget-seconds` bounds the addon probe (1..120); `--wait-seconds` bounds this
56
- CLI invocation (1..600, default 120), including scans and recovery. A longer host
57
- wait does not extend probe execution. The CLI performs prepare/commit, strict
58
- result verification, durable storage and runtime release.
59
-
60
- Recovery has persistent deadlines; resume does not reset them. A CLI timeout
61
- ends the host call, not the Lua probe. Read [budget and evidence rules](live-recovery.md#durable-evidence-and-older-journals)
62
- when recovery is interrupted or exhausted.
63
-
64
- Choose `observation` only when repeating the whole probe after a confirmed new
65
- runtime is safe. Use the default `opaque` for state-changing or uncertain code.
66
- A retry keeps the logical operation/request and records a new attempt/ticket;
67
- it is not evidence that the interrupted attempt did nothing.
68
-
69
- Completion requires `complete: true`, `reportState: verified` and `cleanup: complete`.
70
- Inspect `report.ok`, `report.error`, truncation and assertions separately. A Lua
71
- failure or probe timeout is a verified business outcome and still needs release.
72
- A native complete result needs no ACK/finish/hide command. Original result bytes
73
- remain in the project even after the game exits. Repeat the same request to read
74
- it without executing again, including after later operations on that connection.
75
-
76
- A verified report with pending cleanup is usable evidence plus a recovery
77
- obligation. Keep it and follow [recovery](live-recovery.md), without rerunning Lua.
78
-
79
- The CLI may reload at a quiescent capacity boundary, so probes must reconstruct
80
- scene prerequisites or declare them unreproducible. Ordinary probes do not lock
81
- input; activity labels do not prove acceptance or result retrieval.
53
+ Keep the exact code, request and budget for continuation. `--budget-seconds`
54
+ bounds addon execution (1..120); `--wait-seconds` bounds this host call
55
+ (1..600, default 120). The [durable recovery deadline](live-recovery.md#durable-evidence-and-older-journals)
56
+ survives between calls. Host timeout does not cancel Lua or renew either budget.
57
+
58
+ Select `observation` only when repeating the entire probe after confirmed
59
+ runtime loss is safe. The default `opaque` preserves uncertainty for effects
60
+ that cannot safely repeat. CLI-managed observation recovery keeps the logical
61
+ operation and records another attempt/ticket; it does not prove the old attempt
62
+ did nothing. A new request key is for a genuinely new completed-task experiment,
63
+ not for escaping a pending one.
64
+
65
+ Read the result on three independent axes:
66
+
67
+ | Fact | Meaning |
68
+ | --- | --- |
69
+ | `reportState: verified` | Exact result bytes were verified and retained |
70
+ | `report.ok`, error, assertions and result coverage | Whether the probe's business check succeeded and what it observed |
71
+ | `complete: true` with `cleanup: complete` | This command finished its lifecycle |
72
+
73
+ A verified Lua error/timeout is useful evidence, even when its business result
74
+ failed. Pending cleanup still needs [recovery](live-recovery.md), not another
75
+ execution. Completed native work needs no ACK/finish/hide command. Repeating
76
+ the exact completed request reads retained bytes without rerunning Lua, even
77
+ after later operations or game exit; edited parameters/code are not that retry.
78
+
79
+ The CLI may reload at a quiescent capacity boundary. Scene-dependent probes
80
+ must reconstruct prerequisites or record that they cannot. Ordinary observation
81
+ does not need an input shield, and UI activity labels prove neither execution
82
+ nor result retrieval.
82
83
 
83
84
  ```text
84
85
  lycheedev live disconnect <CON-id> --project <project-directory> --wait-seconds 120 --format json
85
86
  ```
86
87
 
87
- Disconnect at the end of the authorized investigation unless continued use is
88
- needed. It verifies unbind before releasing host ownership, or uses verified
89
- process-exit/runtime-replacement evidence for input-free retirement; see
90
- [ownership and recovery](live-startup.md#ownership-and-recovery).
91
- A repeated completed
92
- close repairs any interrupted host retirement without new game input.
93
- For interrupted opaque work, `closed: true` does not imply a known business
94
- outcome: preserve `operationState: execution_unknown`, `complete: false` and the
95
- missing report. Do not turn successful connection cleanup into task success.
88
+ Disconnect when the authorized investigation ends unless continued use is needed.
89
+ It verifies unbind or [process/runtime retirement](live-recovery.md#ownership-and-runtime-retirement)
90
+ before releasing ownership. Completed-close retry is read-only or repairs its
91
+ interrupted host retirement. `closed: true` can coexist with unavailable report/
92
+ `execution_unknown`; connection cleanup does not establish a business outcome.
93
+ Keep the project's whole `.lycheedev/live` evidence directory together.
96
94
 
97
95
  ## Design a discriminating probe
98
96
 
99
- Use [probe design](live-probes.md#design-a-discriminating-probe) before creating
100
- new Lua: pin the relevant source and define the observation that separates hypotheses.
97
+ Read [probe design](live-probes.md#design-a-discriminating-probe) for a new Lua
98
+ experiment or an unresolved source hypothesis.
101
99
 
102
100
  ## Write bounded probes
103
101
 
104
102
  Use the [bounded API and cleanup rules](live-probes.md#write-bounded-probes).
105
- A host timeout cannot preempt synchronous Lua; ordinary observation needs no input shield.
103
+ A host timeout cannot preempt synchronous Lua.
106
104
 
107
105
  ## Test source hypotheses
108
106
 
109
- Carry the unresolved source path into [live hypothesis testing](live-probes.md#test-source-hypotheses),
110
- then return the observed result to that path. Do not infer source correctness from
111
- an unrelated successful probe.
107
+ Carry fixed locations and conditions into [live hypothesis testing](live-probes.md#test-source-hypotheses),
108
+ then feed observations back into that path. An unrelated successful probe does
109
+ not validate the suspected source or failing conditions.
112
110
 
113
111
  ## Input and recovery
114
112
 
115
- For input blockers, same-installation contention or uncertain input, read
116
- [input recovery](live-recovery.md#input-and-recovery). One original CON/request
117
- continues serially; unknown input is never replay permission.
113
+ For input blockers, contention or uncertain input, use [input recovery](live-recovery.md#input-and-recovery).
114
+ Keep one original CON/request driven serially.
118
115
 
119
116
  ## Recover without replay
120
117
 
121
118
  Read [recovery](live-recovery.md#recover-without-replay) before resuming or reloading.
122
- Pending alone does not call for reload; unchanged blockers do not justify a retry loop.
119
+ Pending alone does not call for reload or an unchanged retry loop.
@@ -13,6 +13,19 @@ Names are mutable selectors; retain the returned immutable PRB revision. Use it
13
13
  with native execute. Old queue-oriented atomic commands belong to legacy records
14
14
  and are not the transport for CON connections.
15
15
 
16
+ ```text
17
+ lycheedev live execute --project <project-directory> --session <CON-id> --probe <PRB-revision> --request <stable-key> --budget-seconds 35 --policy observation --wait-seconds 120 --format json
18
+ ```
19
+
20
+ Choose `observation` only when the whole Lua chunk, including setup and cleanup,
21
+ can safely run again after runtime loss. The CLI may start a new attempt on that
22
+ same request after verified runtime recovery, up to three attempts; it does not
23
+ resume the Lua stack. Reconstruct transient scene state in each attempt. A script
24
+ that saves settings, performs a business action or changes persistent state is
25
+ `opaque` (the default) unless its complete effects are demonstrably repeatable.
26
+ Neither policy permits manually replaying uncertain input or extending the
27
+ original durable deadline. Registering a probe stores source; it does not execute it.
28
+
16
29
  ## Design a discriminating probe
17
30
 
18
31
  For a simple state query, choose the needed fields and verify the APIs it uses;
@@ -62,7 +75,10 @@ For event- or callback-based work, the chunk receives one API as `...`:
62
75
  local probe = ...
63
76
  assert(probe:Async(30)) -- integer seconds, 1..120
64
77
  local frame = CreateFrame("Frame")
65
- assert(probe:OnCleanup(function() frame:UnregisterAllEvents() end))
78
+ assert(probe:OnCleanup(function()
79
+ frame:UnregisterAllEvents()
80
+ frame:SetScript("OnEvent", nil)
81
+ end))
66
82
  frame:RegisterEvent("PLAYER_REGEN_ENABLED")
67
83
  frame:SetScript("OnEvent", assert(probe:Callback(function()
68
84
  probe:Finish({ observed = true })
@@ -71,15 +87,21 @@ end)))
71
87
 
72
88
  Use `probe:Fail("stable_reason")` for an expected failed result,
73
89
  `probe:Log(...)` for bounded diagnostic lines, and `probe:IsCancelled()` before
74
- expensive callback work. Async probes have a mandatory bounded timer, at most
90
+ expensive callback work. The example observes a future combat-exit event; it
91
+ does not establish that the character was in combat beforehand. Add verified
92
+ preconditions or choose the event that actually distinguishes the question.
93
+ Async probes have a mandatory bounded timer, at most 16 wrapped callbacks,
75
94
  16 cleanup callbacks, 100 log entries and 32 KiB of logs. Completion is
76
95
  single-use. Wrap every asynchronous entry with `probe:Callback` so late callbacks
77
96
  cannot enter user code after termination and exceptions become failed reports.
78
- Register resource cleanup before activating each timer/frame. Cleanup runs on
79
- completion, failure or timeout; cleanup failures remain pending
80
- and prevent a false successful acknowledgement. Do
97
+ Register resource cleanup before activating each timer/frame. Cancel owned timers,
98
+ unregister events and detach scripts; hiding a frame alone leaves its callbacks
99
+ and captured values attached. Cleanup runs in reverse registration order on
100
+ completion, failure or timeout. Native execution preserves any verified report
101
+ when cleanup throws, then uses journaled reload/recovery to prove runtime
102
+ destruction; pending recovery remains a separate obligation. Do
81
103
  not create permanent hooks or mutate Blizzard-owned APIs.
82
- Choose the load budget to cover the probe's own async deadline and cleanup; a
104
+ Choose the execute budget to cover the probe's own async deadline and cleanup; a
83
105
  longer host wait cannot extend the declared execution budget.
84
106
 
85
107
  ### Scene prerequisites and optional input protection
@@ -139,9 +161,12 @@ If an internal boundary cannot be observed safely, retain the gap and identify
139
161
  the additional diagnostic capability or reproduction context needed.
140
162
 
141
163
  Give each check a bounded observation window, sample/output budget and cleanup.
142
- Prefer event-driven observation when the question depends on an event. Complete
143
- the loaded operation, interpret and archive its verified report, then finish
144
- that exact operation before starting the next check. Within the existing task
164
+ Prefer event-driven observation when the question depends on an event. Let native
165
+ execute/resume persist the exact verified report and complete its runtime release
166
+ before starting the next check; native CON work needs no legacy ACK or finish
167
+ command. Interpret the business outcome as well as transport and cleanup:
168
+ `reportState: verified` proves retrieval/integrity, `report.ok` states probe
169
+ success, and `cleanup`/`cleanupMethod` states resource closure. Within the existing task
145
170
  authorization, continue these steps without separate confirmation for each one.
146
171
 
147
172
  Feed the observation back into the suspected source path: identify which