--- model: openai/gpt-6-astra service: opencode timestamp: 2026-09-08T21:50:45Z git_ref: 1a2d4893 diff_cmd: git diff HEAD --- ## Generated Changes > `git diff HEAD -- piker/ui/_exec.py` `start_qtractor()` copies global runtime defaults first and explicit caller kwargs last. `run_qtractor()` uses PyQt6's `exec()` API. Existing comments and exception logging are preserved. > `git diff HEAD -- tests/ui/test_qtractor.py` The existing repeated-session regression now seeds stale global registry and runtime overrides before each startup. Its real guest asserts the requested address is bound and the caller's runtime overrides are active before publishing readiness. A parametrized child-process regression exercises the real blocking adapter with normal guest completion and a sentinel exception. It checks exception identity, window cleanup, and actor teardown. Each child uses offscreen Qt and test-owned config and registry addresses. No public provider, paper mode, or chart readiness work is included. ## Verification The existing worktree-local interpreter resolves Piker from this worktree: Python 3.13.14, pytest-qt 4.5.0. The authorized Nix wrapper ran its normal uv check; no environment provisioning was requested. ```xsh nix develop --command timeout -k 5 300 py313/bin/python -m pytest --headless -q -x --tb=short --no-header tests/ui/test_qtractor.py nix develop --command timeout -k 5 300 py313/bin/python -m pytest --headless -q -x --tb=short --no-header tests/ui/test_harness.py tests/ui/test_qtractor.py ``` The focused run passed 3 tests in 2.44s. The combined targeted run passed 5 tests in 2.36s. Each reported two existing Tractor `Registrar.uid` deprecation warnings. `git diff --check` passed. Live Kraken charts, the full suite, paper mode, and readiness changes were not run or implemented. The deployed harness still contains a stale SIGINT warning for `MainWindow`; current source uses structured shutdown. The reference was left untouched. ## Continuation: 2026-09-08T21:56:56Z Model: openai/gpt-6-astra. The original generation above is preserved. > `git diff HEAD -- piker/ui/_app.py` `_async_main()` accepts `exec_mode: str = 'live'`, rejects values other than 'live' and 'paper' before touching the widget, and stores the selection on `GodWidget`. `load_provider_search()` publishes Trio task startup after entering provider search registration and symcache. The application awaits `nursery.start()` before publishing readiness. > `git diff HEAD -- piker/ui/_widget.py` > `git diff HEAD -- piker/ui/_display.py` > `git diff HEAD -- piker/ui/order_mode.py` `GodWidget.load_symbols()` forwards its session execution mode to `display_symbol_data()`, which passes it to `open_order_mode()` and then `open_ems(mode=exec_mode)`. Defaults remain live, matching the existing CLI call. Keeping selection on the widget also covers later search-driven symbol loads. No EMS, broker, or CLI implementation was changed. Existing EMS code checks paper before acquiring brokerd; paper relay cache keys are already distinct from live keys. > `git diff HEAD -- tests/ui/test_chart_startup.py` Added narrow direct tests for invalid-mode rejection before widget access, existing CLI argument binding, explicit paper binding, and entrypoint defaults. There are no interlayer mocks. These assertions do not prove full chart forwarding or provider readiness at runtime. ### Verification The authorized Nix wrapper and existing py313 interpreter resolve Piker inside this worktree, with Python 3.13.14 and pytest-qt 4.5.0. VIRTUAL_ENV is the worktree's py313 directory. Nix ran its normal uv check; no separate environment provisioning was performed. ```xsh nix develop --command timeout -k 5 300 py313/bin/python -m pytest --headless -q -x --tb=short --no-header tests/ui/test_chart_startup.py tests/ui/test_harness.py tests/ui/test_qtractor.py nix develop --command timeout -k 5 300 py313/bin/python -m pytest --headless -q -x --tb=short --no-header tests/test_gap_overlays.py git diff --check ``` First run: 9 passed in 2.67s, two existing `Registrar.uid` deprecation warnings. Second run: 9 passed in 2.00s, one upstream `trio.Event` boolean-use deprecation warning. Diff whitespace check passed. No live provider, compositor, or full-suite execution was performed. Full chart readiness and zero-brokerd behavior need a separately authorized live-feed test using explicit paper mode, isolated registry and config, real search registration assertions, symbol switching, and structured close/restart checks. Paper mode still accesses market data and may write paper accounting state. It is not a process-wide ban on other clients' live execution. ## Live Qualification Continuation: 2026-09-08 Active model: gpt-6-astra (`openai/gpt-6-astra`). Earlier content above is historical and is preserved. The human now explicitly authorizes public Kraken market data, headless Qt, and paper EMS in this same worktree. No credentials, real orders, ownership takeover, staging, commits, ai.skillz edits, or unrelated state changes are authorized. The human requires an opt-in production chart test, isolated registry/config, bounded guest teardown before widget destruction, original errors, and stopping rather than broad repairs. > `git diff HEAD -- tests/conftest.py` > `git diff --no-index -- /dev/null tests/ui/test_live_chart.py` > `git diff HEAD -- piker/brokers/kraken/api.py` Added `--live-provider=kraken` and a production GodWidget/_async_main journey through start_qtractor. The test supplies explicit paper mode, the Tractor fixture's unique registry, owned root config paths, an empty brokers.toml, and inherited piker_test_dir. Existing process XDG isolation protects Qt settings and is inherited by children. There are no interlayer mocks, submitted orders, or symbol interactions. Qt polling races application readiness against guest completion. Finally requests shutdown and pumps Qt with a 60-second bound before normal pytest-qt widget destruction. Guest errors are unwrapped; multiple body/teardown failures are grouped. Exact registry identities and chart SHM names are recorded as pytest properties. Detached known startup widgets are registered with QtBot after guest completion. The test checks paper actors/no observed brokerd, title, markets, nonempty history/realtime arrays, and a subsequent close-price change. The first selected run reproduced a public-client constructor typo: `get_client()` passed `conf={}` to `Client(config, httpx_client, ...)`. Changed only that keyword to `config={}`. The next selected run got past this defect and consumed public Kraken history with paper EMS. ### Exact Commands And Results The existing authorized Nix wrapper resolves Python 3.13.14, Piker in this worktree, pytest-qt 4.5.0, and VIRTUAL_ENV pointing at py313. Its normal uv check ran; no separate provisioning was requested. ```xsh nix develop --command timeout -k 5 300 py313/bin/python -m pytest --headless -q -x --tb=short --no-header tests/ui/test_live_chart.py tests/ui/test_chart_startup.py tests/ui/test_qtractor.py tests/ui/test_harness.py nix develop --command timeout -k 5 300 py313/bin/python -m pytest --headless --live-provider=kraken -q -x --tb=short --no-header tests/ui/test_live_chart.py git diff --check ``` Offline command: initially 9 passed, 1 skipped in 2.66s; final rerun 9 passed, 1 skipped in 2.65s, with two Tractor deprecation warnings. Diff whitespace check passed. Live command was run twice with a targeted fix between runs, not as a blanket provider retry. First: 1 failed, 1 teardown error, 4 warnings in 2.66s. Original guest error was retained: ```text piker/brokers/kraken/api.py:764 in get_client Client(conf={}, httpx_client=trio_client) TypeError: Client.__init__() got an unexpected keyword argument 'conf'. Did you mean 'config'? ``` Second: 1 failed, 1 teardown error, 13 warnings in 12.44s. Readiness and observed paper actor/config checks passed, then: ```text assert set(godw.rt_linked.mode.trackers) == {'paper'} AttributeError: 'LinkedSplits' object has no attribute 'mode'. Did you mean: 'move'? ``` `open_order_mode()` sets its started event at order_mode.py:1024, before `_display.py:1693` assigns rt_linked.mode after entering chart input handlers. `_async_main()` waits for the earlier event before publishing session readiness. Minimal proposed follow-up: publish a display-complete readiness event after these scopes and assignment, rather than weakening this assertion or adding a timing sleep. Qt also reported twice, without a Python item-identifying traceback: ```text NotImplementedError: QGraphicsObject.paint() is abstract and must be overridden ``` The UI isolation fixture reported remaining QFrame, QLabel, QMenu, and ViewBoxMenu objects. Rendering and widget-ownership fixes were not attempted. Identify the offending graphics item and give detached chart resources explicit ownership in a separate bounded follow-up. Guest completion was observed before widgets were destroyed, but it did NOT prove clean actor teardown. Tractor logs show its own forced SIGKILL escalation for datad, samplerd, emsd and both FSP actors. A non-mutating `ps` check found the exact paper child still alive: ```text PID 752893, PPID 1, paperboi.kraken UID e8317c39-ebbb-4526-85f0-3440a2e6e39c parent_addr ('127.0.0.1', 34915) ``` Checked known PIDs 738066, 738721, 749265, 749778, 750704, 751382, 751383, 752409 and 752893; only 752893 remained. No agent-issued signals, manual SHM unlinking, broad cleanup, or subsequent live runs were performed. The runtime's descendant teardown cause is not yet established; it must be diagnosed before claiming clean shutdown. After that failure, the test was tightened to collect chart SHM during startup polling and check exact SHM/endpoints even after a body error. The final version was checked offline only, since the paper survivor remains. The reached run did not execute market/title/array/live-price assertions or the original success-only SHM/endpoint checks. Those are implemented expectations, not passing qualification evidence. Further gaps: polling can miss transient actors; chart tokens omit unpublished and non-chart child SHM; closed endpoints do not prove PID exit; hard guest-timeout safety before widget destruction is not qualified. No full suite, compositor, symbol switching, order journey, or test-exclude changes were made. Existing prerequisite changes and unrelated .gitignore/.ai state were preserved.