docs: record issue 15 final candidate acceptance and limits

This commit is contained in:
阿白叔 committed 2026-11-17 10:06:16 +08:00
1 parent a3f69de201
commit 7eafae417d
3 files changed
+164 -114

No files matched your search

@@ -1,114 +0,0 @@
# Task 1 — resource scopes, lease release and bounded proof
Date: 2026-11-16. Worktree: `F:/Sync Tool Skyworth/Work Maps/cbb-refresh-verify-795-issue15`.
Branch: `codex/issue15-runtime-unblock`. Baseline: `efb8cae`.
## Result
Implemented and verified the Task 1 backend changes. The final covering run passed **409 tests in 86.98 seconds**, exit code 0. No production library, native address, user process, or original dirty checkout was modified. No push, PR, full-suite run, frozen build, or real Mentor acceptance was performed by this task.
Release now carries selected single/multiple project scope, so another unselected project's address cannot retain the completed task's sidecar. Unknown checkpoints still require fresh whole-library resource proof, but a process explicitly bound to another library/project is not a global exit requirement. Native inspection-only results are used for exactly mapped addressed databases; addresses remain in place. Native `IN_USE`, unconfirmed/unfinished inspection, real exclusive-file failure, or unreturned shared work reject release.
`data_recovery_required` describes native data diagnostics, independently of lease release. A confirmed NOT_IN_USE database requiring repair does not poison the library or block an explicit subsequent repair/replacement. No persistent recovery blocker store was added, following the controller's product ruling.
## Changes and callers audited
- `library_lock.py`: per-library serialization for entry, exit, maintenance adoption, snapshots and release; `_guard` now protects quick in-memory operations only. Before committing a release, the exact retained-owner object and checkpoint bytes are checked again. Added optional multi-block scope and stop propagation. The upload `.lock` is never deleted.
- `residual_sessions.py`: passes the entire confirmed `block_names` selection into proof, including multi-selection. Existing observation-only rows remain excluded from close actions and active-release counts. Unknown records cannot use an arbitrary selection to narrow their proof.
- `file_probe.py` and static `application.py --file-probe` dispatch: a pure read-only subprocess scans native files and address/PRJ bindings, rejects reparse paths (including junctions within the same library), and acquires real Windows read handles. Default readiness deadline is 10 seconds; stop/timeout terminates only that helper. It never launches native tools. The parent duplicates the held handles before commit, so even the probe's exit cannot create an unprotected interval. Native files exclude other access; address and PRJ handles allow reads but prevent changes/deletion until commit finishes. Local stdin EOF releases helper resources.
- `icdb_ownership.py`: declared session resource scope and exact address-target inspection. An addressed database needs exactly one matching PRJ and `icdb.dat`; ambiguous/shared mappings fail closed. Healthy/no-address projects do not start an extra native inspection.
- `session_record.py`: optional scope/lease/recovery fields on initial session records and results; legacy release receipts without an observed resource scope are rechecked. Observer cleanup requires the same retained alias and operation identity, protecting newer work.
- `native_export_guard.py`: actual retained-export checks remain; explicitly unrelated native owners no longer veto unknown-checkpoint recovery. Export begin/finish use the per-library guard.
- `management_transaction.py`: `current_lease` uses per-library serialization for checkpoint reads. This narrow extension was approved by the controller after the global-lock caller audit.
Audited `_guard` imports/usages in `library_lock`, `native_export_guard`, `management_transaction`, and `native_management.prepare_owned_fixture_add`. The remaining native-management `_guard` block contains only in-memory identity comparisons and handle conversion; its disk reads already occur outside the global lock. Lock order is per-library then short global guard. No UI, queue, `failed_session`, `mentor_adapter`, or `native_backup` edits.
## Downstream interfaces
Public VerifyRequest/VerifyResult are unchanged. Existing positional callers remain valid.
```python
release_retained_library(library, evidence_dir, *, block_name=None, block_names=(), stop=None)
recheck_previous_release(library, evidence_dir, *, block_name=None,
required=False, progress=None, stop=None)
```
Successful release proof retains `status='RELEASE_CONFIRMED'` and adds:
- `lease_state='RELEASED'`, `blocked_resources=[]`.
- `resource_scope`: `scope_state='OBSERVED'`, library, roots, actual project/database/shared-dependency paths, block_name/block_names, lease_id, and reconciled operation_ids.
- `proof_scope`: `BLOCK`, `BLOCKS`, or `LIBRARY`; `proof_block_names` and legacy `proof_block_name` remain available.
- `data_recovery_required`: `None` when no native data diagnosis was needed, otherwise the native boolean.
- `data_recovery_resources`: exact databases whose inspection requires recovery; `native_inspections` contains the full inspection-only records.
- `data_recovery_confirmed=False` remains explicit. Release is not a save/repair/data-health claim.
Initial worker records contain `lease_state='ACTIVE'`, declared resource scope from job `project`/`pcb`, and `data_recovery_required=None`. Missing/legacy project scope is `RECHECK_REQUIRED`. Downstream code should provide actual `project` and `pcb` when known and preserve optional fields in evidence. A subsequent operation must still acquire its own lease and perform its own resource admission; a past proof is not replayable authority.
## TDD evidence
All test/native subprocess invocations used this worktree's absolute `src` in `PYTHONPATH`. No editable install or machine environment modification was used. After the controller's baseline clearance, tests were written and run before their corresponding implementation.
| Red command (after setting absolute PYTHONPATH) | Observed result before fix | Green evidence |
|---|---|---|
| `python -m pytest tests/test_issue15_resource_release.py -q` (initial four tests) | 4 failed in 2.06 s: B's address forced PARTIAL; unrelated process rejected unknown checkpoint; slow A blocked B; old observer cleared new operation | Initial four passed; 83 related tests passed in 10.10 s |
| `python -X utf8 -m pytest tests/test_issue15_resource_release.py -q` (address/helper additions) | 6 failed, 4 passed in 2.08 s: blanket address gate, global unknown export owner gate, missing helper API | Later 151 related tests passed in 26.57 s |
| `... -k 'survives or journal_records or replacement_lease'` | 2 failed, 1 passed in 1.26 s: helper exit dropped proof protection; journal lacked lease scope | Real DuplicateHandle transfer and scoped journal passed in final run |
| `... -k 'multiple_selected or without_release'` | 1 failed, 3 passed in 2.46 s: A+B expanded into C | Multi-block regression passed; IN_USE/UNCONFIRMED/not-exited safety tests retained |
| `.../run_tests.py -q tests/test_issue15_resource_release.py -k 'legacy_release or stalled_transaction'` | 2 failed in 1.29 s: legacy receipt trusted; stalled checkpoint held global guard | 2 passed in 0.33 s |
| `... -k 'binding_against'` | 1 failed in 1.02 s: address/PRJ writable during proof | 1 passed in 0.62 s |
| `... -k 'scope_junction'` | 1 failed in 0.99 s: same-library junction silently changed target | Passed in final run |
| `... -k 'legacy_release'` (malformed scope case) | 1 failed, 1 passed in 0.76 s: null old scope raised AttributeError | 2 passed in 0.27 s |
The regression module has 22 cases. Real Windows checks include parent-held sidecar rejecting a child then succeeding after scoped release; duplicated exclusive handles surviving probe termination; actual write rejection on address/project binding files; real sleeping subprocess timeout/cancellation and reaping; and an actual Windows junction. Native inspection output is mocked at the native boundary with complete exact-target records; no actual Mentor was launched by these tests.
Additional related runs: 239 passed in 48.24 s (maintenance/export/management/packaging); 214 passed in 38.77 s after global-lock and legacy receipt changes. A test invocation containing nonexistent `tests/test_management_transaction.py` collected no tests; it was corrected to the actual `test_management_native_transaction.py` in the final run. An intermediate external-owner regression exposed loss of WinError 32 through the helper; error propagation was restored and all final cases pass.
## Final verification
Durable local artifacts:
- `.superpowers/sdd/2026-11-16-issue15-runtime-unblock/task-1-tests.log` — exact command and complete pytest output.
- `.superpowers/sdd/2026-11-16-issue15-runtime-unblock/task-1-tests.xml` — JUnit results.
The covering command used the controller's runner, which asserts canonical imports and sets inherited absolute PYTHONPATH:
```text
python -X utf8 .superpowers/sdd/2026-11-16-issue15-runtime-unblock/run_tests.py -q
--junitxml=.superpowers/sdd/2026-11-16-issue15-runtime-unblock/task-1-tests.xml
tests/test_issue15_resource_release.py tests/test_library_lock.py
tests/test_session_record.py tests/test_residual_sessions.py
tests/test_external_owner_release.py tests/test_review_release_followup.py
tests/test_review_foreign_release_evidence.py tests/test_operation_lifecycle.py
tests/test_owner_probe.py tests/test_native_export_guard.py
tests/test_management_native_transaction.py tests/test_management_retry_blockers.py
tests/test_management_probe_guards.py tests/test_independent_operations.py
tests/test_maintenance_entry.py tests/test_maintenance_owner_scope.py
tests/test_maintenance_review.py tests/test_review_backend_followup.py
tests/test_review_319.py tests/test_review326_dispatch_and_receipts.py
tests/test_packaging.py tests/test_packaging_status_bridge.py
```
Actual summary: `409 passed in 86.98s (0:01:26)`; exit code 0. `git diff --check` also passed.
## Concerns and acceptance boundaries
- **Downstream Task 2/4 requirement:** The 10-second cancellable helper bounds native-tree/address/PRJ discovery and native exclusive-file acquisition. Own checkpoint read/write/archive and existing retained-export evidence paths remain synchronous, but are now per-library and do not hold the global memory guard. A wedged network/filesystem operation in those existing paths can still delay that library. Task 2 must apply deadline/handoff and late-call cancellation guards so this cannot retain the global queue/UI indefinitely; Task 4 must verify it. This is not a whole-call timeout claim. The controller explicitly kept that lifecycle work out of Task 1.
- Native inspection runs through the existing independent inspection-only supervisor and is never killed by the pure file-probe timeout. Its diagnostics use retained local temporary directories; complete native result records are also embedded in release evidence. Native tool behavior, native close timing, and on-site reproduction remain unverified here.
- Ambiguous/shared addresses without an exact unique PRJ-to-database mapping remain protected for manual investigation. No address age, unreachable endpoint, process absence alone, or metadata PID is accepted as ownership/release authority.
- No automatic Repair or automatic whole-library backup was added. Full application cancellation/batch/shutdown policy and UI use of the added fields belong to subsequent tasks. Frozen packaging was covered by existing packaging tests and static helper dispatch import, not a new EXE build.
## Review fix round 1
Read the independent review in full; both P1 findings were reproduced before source changes. Fixes are ready for scoped re-review; this report does not claim review acceptance. No public signatures changed and the data-damage-not-occupancy ruling remains unchanged.
1. **Scoped durable release receipts:** added `_proof_covers_session` at the common receipt writer and the durable discovery trust point. A completed/observed proof must match the exact library; a BLOCK/BLOCKS proof must cover the journal's block and have matching observed block membership. The existing operation-ID comparison still prevents a replaced operation receiving an old receipt. Full-library proof remains supported. Single- and multi-block regressions prove an unselected B journal receives no receipt and remains discoverable after clearing memory; additional discovery regressions reject erroneous receipts created by the prior implementation. This fixes the backend sink, rather than filtering UI rows.
2. **Unknown checkpoint external exports:** outside-library command paths alone no longer exclude an exporter/server. The independent `export-owner.json` must identify the exact copy root/project and a valid owner library/lease/token, and export process evidence must match the current full process snapshot's PID, creation time and executable. Missing association, missing identity, or stale identity stays unknown and blocks release; an associated copy remains protected. A proven different-library copy is allowed. Tests obtain owner records through the real `begin_export_analysis`, simulate interpreter restart, and cover both exporter and server descendant. Their PRJ CentralLibrary deliberately points to a different library than the export owner, proving that PRJ reference is not used as ownership authority. The old arbitrary `Other/database` fixture was corrected to expect unknown/protected, not treated as independent ownership evidence.
Red/green commands (the same absolute-import runner is used throughout):
- `python -X utf8 .superpowers/sdd/2026-11-16-issue15-runtime-unblock/run_tests.py -q tests/test_issue15_release_receipts.py` → **4 failed, 1 passed in 1.82 s** before the fix. Subsequent receipt/session/review covering run → **49 passed in 7.92 s**.
- `python -X utf8 .superpowers/sdd/2026-11-16-issue15-runtime-unblock/run_tests.py -q tests/test_issue15_unknown_exports.py tests/test_issue15_resource_release.py -k export` → **5 failed, 2 passed, 21 deselected in 3.93 s** before the fix; → **7 passed, 21 deselected in 3.63 s** after the fix.
- Final covering run repeats the 22 original modules plus `test_issue15_release_receipts.py` and `test_issue15_unknown_exports.py`, with `--junitxml=.superpowers/sdd/2026-11-16-issue15-runtime-unblock/task-1-round1-tests.xml`. Exact command and output are in `task-1-round1-tests.log`: **420 passed in 94.43 s (0:01:34)**, exit code 0, no skipped tests.
- `python -X utf8 -m compileall -q src/cbb_refresh_verify/session_record.py src/cbb_refresh_verify/native_export_guard.py tests/test_issue15_release_receipts.py tests/test_issue15_unknown_exports.py tests/test_issue15_resource_release.py` and `git diff --check` passed.
Process evidence is mocked only at the native snapshot boundary; tests do not launch Mentor. Unknown-copy association uses `_process_snapshot` (full `created`/image evidence), not the abbreviated `query_owners` rows. Incomplete runtime identity therefore remains unknown. The previously documented synchronous checkpoint/export-evidence deadline/handoff requirement remains assigned to Task 2/4. No lifecycle, UI, queue, or native worker expansion was included in this fix round.
@@ -0,0 +1,93 @@
# Issue 15 acceptance matrix
Refs #15. Both affected final B9 native cases passed: automatic cancellation release followed by prequeued Versions, and one-confirmation legacy release. The final complete suite at a3f69de passed **2,351 tests in 497.58 seconds**, exit code 0, with zero failures, errors or skips. Source Qt/Windows tests, source native runs and frozen native runs are separate evidence classes.
## Executable bindings
Each case retains its actual executable hash. Rebuilds checked all packaged modules/resources and repeated the affected operation plus common frozen smoke; earlier passes are not relabelled as tests of the newest executable.
| Build | Code commit | Executable SHA-256 |
|---|---|---|
| B1 | eaff46e | `24201dac278ea91fbc7f1b50146a10e024d4c4bf0da14ec5ecbeedbac65104a0` |
| B2 | fd50805 | `a75414653a399cfc76633cad25544d57749ab5a8b49ef227d0a0833f8828257f` |
| B3 | e0bb243 | `aae0039bfcdcb21ea3d25156920a4124a510a10ac499049604550eddc2ab7645` |
| B4 | de81bbf | `f87e403ee5a4891cff82649f5fef573cd304e5052aa3954faaaf43fd94b2ae88` |
| B5 | 4402486 | `b52b8689dc66cfccbf94d578a23de3021fc6857933d9bea38b77038c3711d721` |
| B6 | d5d1a3d | `f60e2eef44462f590ad81c94c0d2479cd017d519a7e176b34ee45258aae14690` |
| B7 | 845ae58 | `dcdcd33e7909c8d1d3b616ef722734f630ea2f793e7bd162e7e8e722978baf9b` |
| B8 | 7cc65f7 | `e1ba9e057d8147fcf451dd419d63660d507a29c96402b174f8824ed6a8ec159d` |
| B9 | a3f69de | `bfd6c122724f71a2aac4748ed01336a9949aa753f9c58aca55db574668140083` |
B9 ZIP SHA-256: `4c589bae6bf7b68732cd7ebe373b2924016c71f6731fd661c1cd0fd848427438`. All 68 packaged modules and required assets/scripts/bridges/icons match the source; all 242 extracted files match the build. Its five pre-cancelled worker entry routes and common GUI/worker/owner-probe/dialog-agent smoke passed without launching Mentor. B8 is separately archived with ZIP SHA-256 `795010cc0b54b995eced859cac1513bf105092e484a44b1231955801deed879f`; B5 retains ZIP SHA-256 `176c7cda89c2a2706f969fa6dca513d2760615491aaf70c19fe7a0688abe471a`.
## Reported issues A–H
| Issue | Source verification | Actual frozen evidence and limits |
|---|---|---|
| A: cancellation leaves startup prompts/clients | Exact ownership, known prompts, cooperative cancellation, admission and shutdown coverage; late Tip after first Close, held identity, delayed launcher, no second Close, unknown/document/progress/write negatives; single legacy release intent and observer proof. | **REPRODUCED on B5:** Stop 0.797 s after registered PCB startup returned CANCELLED/safe=false with a late Tip and retained PCB/launcher. Manual Tip OK alone completed the existing close; that remains a failure. B8/B9 automatic release and B9 one-confirmation legacy release passed separately, as detailed below. |
| B: another project's address blocks release | Scoped resources, exclusive Windows handles, fresh proofs and independent-item continuation. | B5 Release UI confirms zero active sessions and released library ownership. Earlier metadata handoffs and a separate bounded file-probe timeout remain failures; no native lock/address was manually deleted. |
| C: Versions conflicts with the parent's lease | Parent/child handoff, worker admission and reopening tests. | B1 official Repair, manual backup, exact-version restore, backup verification and reopening succeeded on the selected copied project. Tool exit alone was not counted as successful repair/restore. |
| D: historical records block unrelated/retried work | Legacy evidence is rechecked; a new confirmed operation requires fresh scoped release proof. | B3 corrected 8212 update succeeded in the same data root after the earlier failed operation. The original failed journal remained unchanged; later recovery and B operations continued. |
| E: optional LM dispatch returns without starting PCB | Bounded dispatch observation, exact target binding and owned-LM cleanup. | The direct native route passed. The exact optional-LM dispatch failure is **NOT REPRODUCED**; Windows 10 is **NOT RUN**. |
| F: Save finishes but library remains pending | Unique project/PCB binding, reference alignment and authoritative READY gate; Save/Close/exit/release are distinct. | B2 B-control first Verify remained PENDING and correctly failed; one explicit retry passed GREEN. B3 recovered 8212 source and installed target both passed GREEN. First-pass noncommit cause remains unconfirmed. |
| G: copied database is inconsistent | Diagnostic routing, manual recovery entry and error precedence; automatic Repair stays disabled. | B1 healthy-control Repair passed. Original complete fault-bearing field snapshot is unavailable: **NOT REPRODUCED**. Constructed-copy result is reported separately below. |
| H: selection/input/results/confirmation gaps | Real Qt controls, immutable requests, stale-view protection, one-shot defaults and large-table filters. | B1 basic controls/Add, B2 wrong-source rejection and concurrent view changes, B3 stop-after-current/recovery/removal/reimport, B4 restart without replay, and B5 diagnostic handoff/Release were exercised. Conditional controls are identified below. |
## Important native receipts
These identifiers locate retained local evidence; raw field files, private machine/user identifiers and production paths are not published.
| Build / operation | Receipt | Observed result |
|---|---|---|
| B1 duplicate A then independent B Add | management-c74c9a2b226e4df382be1447d2c9da95; management-4174be063d7843c69406e6610b4cc084 | Duplicate safely rejected; B UPLOADED with native registration/project/top/Layout confirmed. |
| B1 manual Repair / backup / restore / verify | native-backup-ed65d2630b3c | Actual native success output; uniquely described archive and restore location checked. Archive SHA-256 `429195ff63fd76e3586a348357009e4638c06d2d2c27c38e5cdee63f6966d26a`. |
| B1 Versions reopen | native-backup-de1ef77062a4 | Correct project/backup catalog; normal exit and release. |
| B2 fresh-source diagnostic with external observation | icdb-check-455c02cfba8f / verify-d67aa6df8758 | CHECKED/safe; 261 read-only snapshots show Forward Annotation prompt disappearing and loading progress ending before Close. No manual native action. |
| B2 B ordinary Verify | verify-491e77340ae2; verify-742c401bec4f | First FAIL/PENDING despite completed Save/Close/release; separate explicit retry PASS/GREEN with reusable-cell save confirmation. |
| B3 8212 update and actual stop during Add | management-78e5a9b3f24b4353b778a540c6f67e56 | Stop clicked during exact registered LM NATIVE_CALL. Current item completed Add, authoritative readback and release: UPLOADED/safe. |
| B3 CBB backup recovery | backup-restore-4c7aad5bd125 | Source verify-2c4769255397 and target verify-adad45363659 both PASS/GREEN; installed=true; old Work retained; both COMMITTED/CLOSED/EXITED/RELEASED. |
| B3 B remove and reimport | management-c156db77b0c449a0b0e034891aeaacff; management-15a95455d14541e4a47a3b4b2126c8a7 | REMOVED with authoritative catalog absence, then UPLOADED from the independent source. Auto-verify off. |
| B4 restart | restart-before-06 / restart-after-06 | Operation-root sets unchanged and no native process before explicit Read: no automatic replay. |
| B5 diagnostic intent/ack/Close | icdb-check-8683e232ce83 / verify-755f3af6b650 | CHECKED/safe, 38.437 s; exact intent/ack/Close identity and nonce match; intent precedes Close by 0.125 s. |
| B5 explicit Release | sessions-e4c27855ec69 | UI and durable RELEASE_CONFIRMED agree; zero active sessions, 7.704 s. Exact file-probe helper returned HELD and exited normally; read-only observation sent no target control action. |
| B5 early native Stop — original failure | icdb-check-63f7ee04d30b / verify-719b874e0aaf | Actual Stop 0.797 s after PCB registration, before loaded readiness: CANCELLED at PCB_STARTING, 31.875 s, safe=false, native clients retained. 894 read-only snapshots showed the late Tip. Manual exact Tip OK allowed both clients to exit with no further Close, Save, annotation or force action. |
| B6 early native Stop — loaded-target transition | icdb-check-762d0b790c2c / verify-67752f3332dd | Stop 0.813 s after PCB registration: Tip was automatically dismissed before any Close; target then loaded and showed Forward Annotation. CANCELLED/safe=false, 31.625 s; 892 read-only snapshots. Manual exact Forward No, then one normal target Close after progress ended, exited both clients without Save/annotation/force. This failure prompted the bounded cancelled-diagnostic loaded-target cleanup. |
| B7 late exit after bounded cleanup | icdb-check-ac97c21a1863 / verify-0a4f641d37d3; sessions-98a1beebfb10 | Automatic one Close and late Tip dismissal; native exit followed the original deadline. Original CANCELLED/safe=false remained. A later manual Release obtained fresh proof, so this did not establish automatic observer release. |
| B8 automatic cancellation and prequeued Versions | icdb-check-64348b7f55c5 / verify-505a4f09d4e7; native-backup-073e59195f9b | Versions queued after PCB registration and before Stop; UI terminal 7.125 s. Automatic Tip/Forward No/one Close, natural exit, existing observer RELEASE_CONFIRMED. Queued native client created 2.075 s after proof and catalog loaded. No Release click/manual diagnostic native action; original CANCELLED/safe=false retained. |
| B5-to-B8 legacy release — incomplete workflow | icdb-check-17661d31889d / verify-4b7bc47b39f8; sessions-12c1715f5d7f, sessions-38ed41c344f8, sessions-2cca647d90da | Initial inspection handed off before a plan; Recheck succeeded. First confirmation declined Forward but did not close; second closed PCB/launcher while server remained; third obtained fresh proof. No manual native action, but multiple confirmations were required: not accepted as the intended final workflow. |
| B9 automatic cancellation and prequeued Versions | icdb-check-b05147dc18bc / verify-3abaddb3e141; native-backup-005da267ebfe | Versions queued before Stop/handoff; UI terminal 6.672 s. Automatic Tip/Forward No/one Close; 307 read-only snapshots and kernel exit. Existing observer obtained fresh library RELEASE_CONFIRMED; queued native client created 1.684 s later and catalog loaded. Zero Release clicks/manual diagnostic native actions. Original CANCELLED/safe=false retained; backend duration 12.829 s is distinct from UI timing. |
| B5-to-B9 legacy release — one confirmation | icdb-check-378044ad1122 / verify-d2acda2739c2; sessions-a5a9fe06b7c1 | Real B5 retained loaded target/Forward; old app normally exited. B9 initial inspection succeeded, one normal Confirm, zero Recheck/second confirmation/manual native actions. Forward disappeared after 3.562 s; 210 read-only snapshots show kernel exit. PCB, launcher and server RELEASED, fresh RELEASE_CONFIRMED at 22.634 s; UI agreed and Confirm disabled. Existing cold observer RELEASED; original cancellation result retained. |
The B2 diagnostic run supports the implemented sole-handler No sequence through observed windows and verified code; there is no separate startup button acknowledgement event. The hidden-owner-chain save branch did not recur on corrected native runs and remains covered by regression tests plus the original captured chain. The original failed diagnostic required manual cleanup and a native crash acknowledgement; that crash was **NOT REPRODUCED** in the subsequent bounded runs.
## Buttons and misuse scenarios
| Controls / scenario | Source coverage | Frozen coverage |
|---|---|---|
| Tabs, advanced options, optional LM checkbox, runtime log toggle | Actual source UI and Qt tests | B1 actual navigation/toggles. |
| Library chooser Open/Cancel and Read CBB | Actual chooser/catalog; invalid-input tests | B1 chooser cancellation and catalog; B3 removal/reimport catalog; B4/B5 explicit reload. |
| Select visible, Clear, filter/hidden selection | Actual UI and 381/3,000-row Qt checks | B1/B2 actual controls and view changes; immutable original operation retained. |
| Verify selected / visible non-READY | Actual source native verification and Qt admission | B2 ordinary Verify; B3 recovery target verification. READY exclusion remains enforced. |
| ICDB batch confirmation No/Yes and stop | Actual source checks; Qt stop/continuation | B1/B2 confirmation cancellation and diagnostic runs; B5 acknowledged close; B8/B9 actual startup Stop and automatic queued continuation. Other cancellation timing remains conditional. |
| Manual Repair Cancel/Confirm | Actual native healthy control | B1 native diagnostics/defragmentation; not field-fault recovery proof. |
| Versions / create backup / restore Cancel/Confirm / verify / Close/reopen | Actual exact archive and location | B1 native tool operations and reopening. |
| Add / source chooser / empty input / auto-verify / logs / No/default Yes | Actual source and Qt | B1 duplicate-plus-independent Add; B3 reimport. |
| Same-name update / wrong source / reselection / No/default Yes | Actual source and Qt | B2 mismatch rejected before writing; B3 correct update. |
| Remove / hidden source chooser / No/Yes / result | Actual source and Qt | B3 REMOVED and native catalog absence before reimport. |
| CBB backup recovery / empty input / chooser Cancel / No/Yes | Actual source and Qt | B3 full source-validation/install/target-validation sequence. |
| Management stop-after-current | Two-item Qt/real admission tests verify next item skipped, including failed readback and unknown release | B3 stop during native Add; mandatory current-item readback completed. |
| Queued cancellation / active dialog close | Qt queue, close, hard-cancel and shutdown tests | Second management submission was disabled during an active batch; queued-cancel condition was not reached. Active lower Close button was disabled. |
| Residual sessions / Recheck / Confirm / Close | Qt exact scope, one-intent observer promotion and real Windows proofs | B5 zero-active-session release; B9 initial inspection and one-confirmation release of a real B5 cancelled session; previous failed/multiple confirmations retained. |
| Native details / Save prompt / native Cancel / forced termination | Qt exact ownership/prompt and default-Cancel tests | Disabled with no matching active owned client. No forced native termination claimed. |
| Conditional result recovery/release/resume buttons | Qt target binding, stale results and single continuation | Conditions not all triggered in final native runs; no blanket pass claim. |
| Three-second defaults / manual-vs-deadline / hidden or closed prompts | One-shot Qt timer tests | Actual management/recovery No and timed Yes; full timing competition covered in Qt. |
| Double submission / result remaining open / view changes / restart | Qt and Windows lifecycle tests | Active execute controls disabled; modeless dialogs and view changes observed; B4 no replay. |
| Open logs/evidence / shell errors | Qt dispatch and error reporting | Log toggle exercised; external shell-open actions not claimed as native acceptance. |
One B1 harness edit targeted the library textbox while a modeless dialog changed control indices. The immutable original-library operation still completed and the changed view was invalidated. This is retained as a harness/misuse event, not a product search failure.
## Constructed copy and remaining limits
Constructed-copy experiment: **COPY_BLOCKED; inconsistency NOT REPRODUCED** (1 attempt, maximum 3). The healthy control passed normal native Verify. On a separate disposable copy, the documented native property write and stock Save actually ran; ordinary Work copying encountered Windows sharing violation 32 at the 113th attempted file, database/icdb.dat, after 0.470 seconds. The source still completed Save/Close and authoritative PASS/GREEN with released resources. The partial clone was never opened and no native Repair claim is made for it. This fault-creation instrumentation did not modify the frozen product and does not reproduce the original field incident.
The original field inconsistency remains **NOT REPRODUCED**. Windows 10 and production SMB/network behavior are **NOT RUN**. Initial B-control PENDING results, diagnostic/manual-cleanup failures, metadata handoffs and the bounded file-probe timeout remain visible in the evidence. This report does not authorize merging, release publication or issue closure.
@@ -0,0 +1,71 @@
# Issue 15 runtime and recovery candidate
Refs #15. This candidate records local Windows 11 acceptance and its limits; it is not a published release or field-acceptance approval.
The PR base is main at e4875b4. The branch also includes the previously approved efb8cae three-second confirmation defaults.
The change separates native task execution, client exit, coordination-lease release, data recovery and eligibility for the next write. A completed independent item no longer inherits another project's address or a stale historical blocker. Unknown ownership still requires fresh proof; the application does not delete native address or lock files.
## Implementation
- Resource release uses exact project/database/library scope and observed process identity. Read-only file probes retain exclusive handles through release commitment. Legacy receipts are rechecked; a proof for one block cannot close another block's session.
- Each UI operation owns its immutable requests, cancellation signal and view revision. Queued work and late callbacks cannot write into a replacement library view. Native writes stay serial; registered worker handles and event admission protect shutdown handoff.
- Fast directory discovery and authoritative native catalog/status reconciliation are separate. Directory-only records are not treated as native entries. READY items remain available for management and are excluded from ordinary verification/maintenance admission.
- Manual Repair and version history open the official tool for the exact selected project/database, including recovery-required projects. The application does not submit Repair automatically or treat tool closure as successful recovery or READY.
- Results and management/recovery/release dialogs remain nonmodal. Three-second defaults preserve one-shot manual priority; unknown occupancy skips, exit saves, and forced termination defaults to cancellation.
- Native acceptance exposed two premature timeouts: successful catalog completion after the metadata deadline, and a progressing complete-library manifest exceeding that deadline. Catalog commit/wait now uses the existing read-only native channel; successful metadata work renews inactivity without changing stalled-I/O limits or native transaction behavior.
- A transient incomplete native-window scan is retried within the original open/close deadlines. Partial snapshots never authorize a control action. Persistent incomplete observation, unknown prompts and identity mismatches still fail closed.
- Same-name update validates the resolved source project name before native removal. A mismatched source remains selectable in the dialog for correction; the UI preview performs no filesystem resolution. The native Add dialog fields are reread immediately before submission.
- Save/Close may close the exact owned Project Integration panel only when all four complete statuses say no changes are pending and the unique Close control is enabled. Native inconsistency/error evidence takes precedence; partial, foreign or pending panels do not authorize closure.
- A new explicitly confirmed recovery attempt can proceed after a fresh release proof for the exact library and block is recorded under that new operation. Old failed journals remain unchanged; default requests, cached proofs and proofs for another target cannot authorize a retry.
- Hidden native worker failures now write compatible result records and tracebacks before exiting. Admission and entered-worker failures remain distinct, existing save evidence is preserved, and exceptions never establish release. This prevents a cancelled frozen worker from blocking on the packaging runtime's error dialog.
- Completed release and occupancy checks now renew the existing metadata inactivity clock. Cancellation and abandoned calls cannot be revived; active native transactions keep their existing continuation rules. This fixes a frozen Add that expired across a successful seven-second release proof followed by two successful occupancy checks before any native write.
- Diagnostic opening waits for an enabled target frame with no visible loading progress. After fresh project/PID evidence, its sole handler declines the exact owned Forward Annotation prompt. A close intent containing the current operation, target identity and nonce requires an exact supervisor acknowledgement after any in-flight dialog poll. The worker then rechecks readiness, prompts, native errors and cancellation before posting Close; acknowledgement consumes the original 30-second close budget. Ordinary Verify retains its own confirmation policy. A nested save prompt is accepted only through the captured, bounded chain of same-process, same-desktop, hidden disabled Expedition dialogs to the exact frame.
- The management dialog's stop-after-current button and active-window close request now stop the batch at the next item boundary. The current item completes its native writes, required directory readback and result bookkeeping. A queued batch can still be cancelled before admission. Global cancellation, shutdown, process identity checks and worker admission remain separate. Real acceptance exposed the former hard-cancel signal interrupting the readback after successful Remove/Add.
- Explicit release renews metadata inactivity after completed process snapshots, owner checks, held-file proofs and durable evidence steps. Multiple successful checks can finish without a false UI handoff; a single stalled step still times out. A late or cancelled proof cannot remove the coordination checkpoint or close the retained lease after its context has been abandoned.
- Actual early Stop reproduced a late Tip arriving after the one normal empty-frame Close. Startup cleanup now retains the original process handle and, within the original timeout, can dismiss that exact known Tip after rechecking the private desktop, empty frame, complete windows and lack of progress/documents/unknown prompts. When Close already hid the frame, only the Tip's direct hidden, disabled owner is inspected; hidden MDI documents also veto the action. The deadline and release Stop signal are rechecked immediately before clicking. It never posts another Close. Normal residual release shares this guarded acknowledgement for already-retained sessions, then waits for exit without forced termination or another Close. PCB exit, launcher exit and resource release remain separate requirements.
- A second actual cancellation race loaded the target after Tip dismissal, while COM/document admission had already stopped. Cancelled diagnostic startup now uses the existing fresh native path/PID logs and exact target MDI identity to decline Forward Annotation and finish one normal Close. Only exact owned No actions are allowed; unknown siblings, foreign identities, visible progress and writes remain protected. The supervisor completes its last poll before creating the cancellation signal, so cleanup is the sole prompt actor and does not wait for a normal-close acknowledgement. Its diagnostic 30-second cleanup budget starts once; an empty-to-loaded transition does not reset it. Cleanup never establishes CHECKED, READY or successful verification.
- Diagnostic cancellation yields to the existing registered observer after a bounded five-second wait; ordinary write waiting is unchanged. If the worker exits before its native clients, the same observer keeps ownership until client exit and fresh scoped release proof. Queue admission waits only for an actual initializing or live observer, so historical caches and unrelated libraries cannot create a permanent wait. The original cancellation result remains historical evidence. Report completion writes only unique application evidence files and can finish while native cleanup continues.
- Normal residual release can recover an older cancelled diagnostic startup using its complete existing registration, terminal worker, exact current native identity/command/private desktop/MDI and absence of Save evidence. That authority permits cleanup only; a missing prelaunch log baseline is never fabricated or treated as successful opening validation. The action rechecks binding immediately before each No or Close and respects a previously recorded close. Partial, foreign, active-write or ambiguous evidence remains blocked.
- One normal Release confirmation gives that proven legacy diagnostic cleanup one 30-second budget, including the known transition after Forward No. It runs in the existing read-only native phase, then the existing registered observer can obtain fresh release proof after late exit without another confirmation. Observer promotion requires the same operation and current Windows user/session; cleanup requires exactly one target MDI document. Ordinary close remains three seconds and ordinary native-write waiting remains unchanged. Pure residual inspection uses metadata-only admission so it remains available during native finalization.
## Evidence retained locally
Task 1's durable findings are consolidated here rather than tracking orchestration scratch files. Its final scoped backend coverage was 420 tests after review fixes; those tests cover real Windows exclusive/duplicated handles, scoped receipt trust, cancellation and unknown export ownership. They do not establish real Mentor behavior. Subsequent task evidence and all failed attempts remain in the local acceptance evidence archive; raw field data, process snapshots, host/user identifiers and production paths are not included in this repository report.
The initial Task 5 full run had 2,111 passes and one obsolete internal test entry. The test now uses the dedicated catalog-only handler while retaining the original mapping-order assertions. A separate regression reproduced child Python importing another editable checkout; test-session configuration now preserves the active worktree in inherited PYTHONPATH without changing machine configuration.
## Native acceptance recorded so far
All native operations use complete, hash-verified local copies with main/PCB/database references bound to the selected copied library. Source and frozen runs use independent copies.
| Source scenario | Observed outcome |
|---|---|
| Native catalog | Four original registered entries and authoritative READY statuses confirmed; fast discovery alone was not accepted. |
| Batch add with first-item name conflict | Existing name rejected safely; independent next source added and confirmed through native catalog/readback. Auto-verify was disabled; the new item remained pending. |
| Manual Repair | Official confirmation cancelled without submission, then explicitly confirmed on the healthy added control. Native diagnostics/defragmentation completed; the native tool also reported a missing optional project file. This is not a reproduced field inconsistency. |
| Manual backup and native restore | A uniquely described manual version was created; exact archive identity and restore location checked. Cancel and committed restore exercised; native restore and backup verification reported success. |
| Versions reopening | Exact restored project reopened successfully; normal close exited with release confirmed. Tool closure alone did not claim repair/restore validation. |
| ICDB check after restore | Initial observation-timeout failure retained; corrected same-button rerun returned CHECKED and safe resource release. It did not claim READY. |
| Release observations | No active clients remained; zero active sessions were reported released while old observation records were cleared. Conditional native save/cancel/force controls remained disabled. |
| Wrong-source same-name update | Earlier attempt exposed a missing name check and retained recovery-required evidence. The corrected UI rejects that source before submission and permits reselection. An audit of 21 major files in three unrelated blocks found no changes. |
| Corrected update after recovery | Exact-name source restored the missing target. A new confirmed update in the original application data root succeeded with a fresh scoped release proof; the old recovery-required journal was preserved. |
| Ordinary verification | Recovered target reached PASS/GREEN with native save committed, document closed, helper exited and resources released, without manual intervention. An earlier different target required manual native panel closure and remains classified as manual intervention. |
| CBB backup recovery | Actual dialog empty-input rejection, chooser cancellation and No/Yes confirmation were exercised. The isolated source validation and installed target verification both passed with GREEN; the old Work directory was retained. No manual native intervention was needed. |
| Automatic Project Integration panel close | The B control's first Verify automatically closed the completed panel and finished Save/Close/release, but authoritative status stayed PENDING and was correctly reported as FAIL. One explicitly requested fresh Verify then confirmed the native reusable-cell save and reached PASS/GREEN. The exact first-pass noncommit cause remains unconfirmed. |
The first full regression after these changes recorded 2,144 passes and eight fixture failures. Three tests still edited the old project filename, four lifecycle cases used an outdated control-helper signature, and one independent-item test reused a differently named source. The fixture updates preserve the original identity and lifecycle assertions. After the hidden-worker correction and isolation of simulated clients between tests, the full run at that stage passed **2,175 tests in 522.52 seconds**, exit code 0. The previous full regression at code commit 4402486 passed **2,246 tests in 572.82 seconds**, with zero failures, errors or skips and exit code 0. One earlier run was cooperatively interrupted after 2,151 passes when old test doubles contaminated the new entry tests; its stack and interrupted result are retained separately. Compilation and diff checks also passed.
The final complete regression at code commit a3f69de passed **2,351 tests in 497.58 seconds**, exit code 0, with zero failures, errors or skips. Log SHA-256: `aa820f1202becd30ee220c8e660fcde0e063d9ed874023ab3487108aedae214d`; JUnit SHA-256: `7d951ad853978e58aabaa481656c15b8610f01fdf9d64f67af0585dda9bc3bbe`. Actual native applications were normally closed and the writer/management mutexes were idle before and after this run.
The final candidate B9 is built from code commit a3f69de. All 68 packaged modules, assets, bridge programs, scripts and icon images match; all 242 ZIP-extracted files match the build. Executable SHA-256: `bfd6c122724f71a2aac4748ed01336a9949aa753f9c58aca55db574668140083`. ZIP SHA-256: `4c589bae6bf7b68732cd7ebe373b2924016c71f6731fd661c1cd0fd848427438`. Five actual pre-cancelled frozen entry routes exited without acknowledgement or termination and wrote the expected results. Common GUI, worker, owner-probe and dialog-agent smoke passed.
B9 repeated the two affected native cases. Versions was queued after exact diagnostic PCB registration and before Stop. The UI reached its cancellation terminal state in 6.672 seconds; the original result remains CANCELLED/safe=false. Automatic guarded Tip/Forward No/Close cleanup and the existing observer produced fresh library release proof; the queued Versions native client started 1.684 seconds after that proof and loaded its backup catalog. No Release click or manual diagnostic native action occurred. Separately, B5 produced a real cancelled, loaded-target legacy session. B9's initial inspection succeeded and one normal Release confirmation released the PCB, launcher and database server with fresh RELEASE_CONFIRMED proof in 22.634 seconds. The UI agreed and disabled Confirm; no Recheck, second confirmation, manual native action, Save, annotation or forced termination occurred. The old cancellation result was retained. The earlier B8 legacy path required multiple confirmations and is preserved as an incomplete workflow, not a final pass.
The [acceptance matrix](2026-11-17-issue15-acceptance-matrix.md) records each native case against its actual executable hash. Earlier successful cases remain bound to their original builds; they are not relabelled as new-build tests. The constructed-copy experiment ended with Windows sharing violation 32 at database/icdb.dat during native Save. Its source passed GREEN and released normally; the incomplete clone was never opened. The B5 early Stop returned CANCELLED with retained PCB/launcher and safe_to_continue=false; manual Tip OK alone completed the pending Close. That failure is preserved. The late-Tip fix and its new native acceptance are recorded separately.
## Limits
The exact complete fault-bearing field snapshot is unavailable, so the original field inconsistency remains **NOT REPRODUCED**. Any bounded constructed live-copy experiment is reported separately. Windows 10 and production network/SMB behavior are **NOT RUN**. No merge, published release or issue closure is authorized by this candidate report.
One local B control required a second explicit verification after an initial completed native Save/Close left it PENDING. Both results are retained; automatic retries were not added and the initial failure is not counted as a pass.