Add neutral `.ai` workflow config
Select the provider-neutral backend and port repo-owned commit-msg and test-harness refs into `.ai`. Also, - ignore local `.agents` links and generated runtime state. - retain legacy Claude archives for recovery. - record Prompt-IO provenance for the migration. Prompt-IO: ai/prompt-io/opencode/20260907T214000Z_9115d24_prompt_io.md (this patch was generated in some part by `opencode` using `gpt-5.6-sol` (`openai`))moar_ai_skillz
parent
00e7ca45f6
commit
f148fbcc23
|
|
@ -0,0 +1,259 @@
|
||||||
|
# Piker Git Commit Message Style Guide
|
||||||
|
|
||||||
|
Learned from analyzing 500 commits from the piker repository.
|
||||||
|
|
||||||
|
## Subject Line Rules
|
||||||
|
|
||||||
|
### Length
|
||||||
|
- Target: ~50 characters (avg: 50.5 chars)
|
||||||
|
- Maximum: 67 chars (hard limit, though historical max: 146)
|
||||||
|
- Keep concise and descriptive
|
||||||
|
|
||||||
|
### Structure
|
||||||
|
- Use present tense verbs (Add, Drop, Fix, Move, etc.)
|
||||||
|
- 65.6% of commits use backticks for code references
|
||||||
|
- 33.0% use colon notation (`module.file:` prefix or `: ` separator)
|
||||||
|
|
||||||
|
### Opening Verbs (by frequency)
|
||||||
|
Primary verbs to use:
|
||||||
|
- **Add** (8.4%) - New features, files, functionality
|
||||||
|
- **Drop** (3.2%) - Remove features, dependencies, code
|
||||||
|
- **Fix** (2.2%) - Bug fixes, corrections
|
||||||
|
- **Use** (2.2%) - Switch to different approach/tool
|
||||||
|
- **Port** (2.0%) - Migrate code, adapt from elsewhere
|
||||||
|
- **Move** (2.0%) - Relocate code, refactor structure
|
||||||
|
- **Always** (1.8%) - Enforce consistent behavior
|
||||||
|
- **Factor** (1.6%) - Refactoring, code organization
|
||||||
|
- **Bump** (1.6%) - Version/dependency updates
|
||||||
|
- **Update** (1.4%) - Modify existing functionality
|
||||||
|
- **Adjust** (1.0%) - Fine-tune, tweak behavior
|
||||||
|
- **Change** (1.0%) - Modify behavior or structure
|
||||||
|
|
||||||
|
Casual/informal verbs (used occasionally):
|
||||||
|
- **Woops,** (1.4%) - Fixing mistakes
|
||||||
|
- **Lul,** (0.6%) - Humorous corrections
|
||||||
|
|
||||||
|
### Code References
|
||||||
|
Use backticks heavily for:
|
||||||
|
- **Module/package names**: `tractor`, `pikerd`, `polars`, `ruff`
|
||||||
|
- **Data types**: `dict`, `float`, `str`, `None`
|
||||||
|
- **Classes**: `MktPair`, `Asset`, `Position`, `Account`, `Flume`
|
||||||
|
- **Functions**: `dedupe()`, `push()`, `get_client()`, `norm_trade()`
|
||||||
|
- **File paths**: `.tsp`, `.fqme`, `brokers.toml`, `conf.toml`
|
||||||
|
- **CLI flags**: `--pdb`
|
||||||
|
- **Error types**: `NoData`
|
||||||
|
- **Tools**: `uv`, `uv sync`, `httpx`, `numpy`
|
||||||
|
|
||||||
|
### Colon Usage Patterns
|
||||||
|
1. **Module prefix**: `.ib.feed: trim bars frame to start_dt`
|
||||||
|
2. **Separator**: `Add support: new feature description`
|
||||||
|
|
||||||
|
### Tone
|
||||||
|
- Technical but casual (use XD, lol, .., Woops, Lul when appropriate)
|
||||||
|
- Direct and concise
|
||||||
|
- Question marks rare (1.4%)
|
||||||
|
- Exclamation marks rare (1.4%)
|
||||||
|
|
||||||
|
## Body Structure
|
||||||
|
|
||||||
|
### Body Frequency
|
||||||
|
- 56.0% of commits have empty bodies (one-line commits are common)
|
||||||
|
- Use body for complex changes requiring explanation
|
||||||
|
|
||||||
|
### Bullet Lists
|
||||||
|
- Prefer `-` bullets (16.2% of commits)
|
||||||
|
- Rarely use `*` bullets (1.6%)
|
||||||
|
- Indent continuation lines appropriately
|
||||||
|
|
||||||
|
### Section Markers (in order of frequency)
|
||||||
|
Use these to organize complex commit bodies:
|
||||||
|
|
||||||
|
1. **Also,** (most common, 26 occurrences)
|
||||||
|
- Additional changes, side effects, related updates
|
||||||
|
- Example:
|
||||||
|
```
|
||||||
|
Main change described in subject.
|
||||||
|
|
||||||
|
Also,
|
||||||
|
- related change 1
|
||||||
|
- related change 2
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **Deats,** (8 occurrences)
|
||||||
|
- Implementation details
|
||||||
|
- Technical specifics
|
||||||
|
|
||||||
|
3. **Further,** (4 occurrences)
|
||||||
|
- Additional context or future considerations
|
||||||
|
|
||||||
|
4. **Other,** (3 occurrences)
|
||||||
|
- Miscellaneous related changes
|
||||||
|
|
||||||
|
5. **Notes,** **TODO,** (rare, 1 each)
|
||||||
|
- Special annotations when needed
|
||||||
|
|
||||||
|
### Line Length
|
||||||
|
- Body lines: 67 character maximum
|
||||||
|
- Break longer lines appropriately
|
||||||
|
|
||||||
|
## Language Patterns
|
||||||
|
|
||||||
|
### Common Abbreviations (by frequency)
|
||||||
|
Use these freely in commit bodies:
|
||||||
|
- **msg** (29) - message
|
||||||
|
- **mod** (15) - module
|
||||||
|
- **vs** (14) - versus
|
||||||
|
- **impl** (12) - implementation
|
||||||
|
- **deps** (11) - dependencies
|
||||||
|
- **var** (6) - variable
|
||||||
|
- **ctx** (6) - context
|
||||||
|
- **bc** (5) - because
|
||||||
|
- **obvi** (4) - obviously
|
||||||
|
- **ep** (4) - endpoint
|
||||||
|
- **tn** (4) - task name
|
||||||
|
- **rn** (3) - right now
|
||||||
|
- **sig** (3) - signal/signature
|
||||||
|
- **env** (3) - environment
|
||||||
|
- **tho** (3) - though
|
||||||
|
- **fn** (2) - function
|
||||||
|
- **iface** (2) - interface
|
||||||
|
- **prolly** (2) - probably
|
||||||
|
|
||||||
|
Less common but acceptable:
|
||||||
|
- **dne**, **osenv**, **gonna**, **wtf**
|
||||||
|
|
||||||
|
### Tone Indicators
|
||||||
|
- **..** (77 occurrences) - Ellipsis for trailing thoughts
|
||||||
|
- **XD** (17) - Expression of humor/irony
|
||||||
|
- **lol** (1) - Rare, use sparingly
|
||||||
|
|
||||||
|
### Informal Patterns
|
||||||
|
- Casual contractions okay: Don't, won't
|
||||||
|
- Lowercase starts acceptable for file prefixes
|
||||||
|
- Direct, conversational tone
|
||||||
|
|
||||||
|
## Special Patterns
|
||||||
|
|
||||||
|
### Module/File Prefixes
|
||||||
|
Common in piker commits (33.0% use colons):
|
||||||
|
- `.ib.feed: description`
|
||||||
|
- `.ui._remote_ctl: description`
|
||||||
|
- `.data.tsp: description`
|
||||||
|
- `.accounting: description`
|
||||||
|
|
||||||
|
### Merge Commits
|
||||||
|
- 4.4% of commits (standard git merges)
|
||||||
|
- Not a primary pattern to emulate
|
||||||
|
|
||||||
|
### External References
|
||||||
|
- GitHub links occasionally used (13 total)
|
||||||
|
- File:line references not used (0 occurrences)
|
||||||
|
- No WIP commits in analyzed set
|
||||||
|
|
||||||
|
### Coding-harness Footer
|
||||||
|
When a coding harness assisted with the written patch,
|
||||||
|
identify the active harness, model, and provider:
|
||||||
|
|
||||||
|
```
|
||||||
|
(this patch was generated in some part by `<harness>` using `<model>` (`<provider>`))
|
||||||
|
```
|
||||||
|
|
||||||
|
When it generated only the commit message, use:
|
||||||
|
|
||||||
|
```
|
||||||
|
(this commit msg was generated in some part by `<harness>` using `<model>` (`<provider>`))
|
||||||
|
```
|
||||||
|
|
||||||
|
## Piker-Specific Terms
|
||||||
|
|
||||||
|
### Core Components
|
||||||
|
- `pikerd` - piker daemon
|
||||||
|
- `brokerd` - broker daemon
|
||||||
|
- `tractor` - actor framework used
|
||||||
|
- `.tsp` - time series protocol/module
|
||||||
|
- `.fqme` - fully qualified market endpoint
|
||||||
|
|
||||||
|
### Data Structures
|
||||||
|
- `MktPair` - market pair
|
||||||
|
- `Asset` - asset representation
|
||||||
|
- `Position` - trading position
|
||||||
|
- `Account` - account data
|
||||||
|
- `Flume` - data stream
|
||||||
|
- `SymbologyCache` - symbol caching
|
||||||
|
|
||||||
|
### Common Functions
|
||||||
|
- `dedupe()` - deduplication
|
||||||
|
- `push()` - data pushing
|
||||||
|
- `get_client()` - client retrieval
|
||||||
|
- `norm_trade()` - trade normalization
|
||||||
|
- `open_trade_ledger()` - ledger opening
|
||||||
|
- `markup_gaps()` - gap marking
|
||||||
|
- `get_null_segs()` - null segment retrieval
|
||||||
|
- `remote_annotate()` - remote annotation
|
||||||
|
|
||||||
|
### Brokers & Integrations
|
||||||
|
- `binance` - Binance integration
|
||||||
|
- `.ib` - Interactive Brokers
|
||||||
|
- `bs_mktid` - broker-specific market ID
|
||||||
|
- `reqid` - request ID
|
||||||
|
|
||||||
|
### Configuration
|
||||||
|
- `brokers.toml` - broker configuration
|
||||||
|
- `conf.toml` - general configuration
|
||||||
|
|
||||||
|
### Development Tools
|
||||||
|
- `ruff` - Python linter
|
||||||
|
- `uv` / `uv sync` - package manager
|
||||||
|
- `--pdb` - debugger flag
|
||||||
|
- `pdbp` - debugger
|
||||||
|
- `asyncvnc` / `pyvnc` - VNC libraries
|
||||||
|
- `httpx` - HTTP client
|
||||||
|
- `polars` - dataframe library
|
||||||
|
- `rapidfuzz` - fuzzy matching
|
||||||
|
- `numpy` - numerical library
|
||||||
|
- `trio` - async framework
|
||||||
|
- `asyncio` - async framework
|
||||||
|
- `xonsh` - shell
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
### Simple one-liner
|
||||||
|
```
|
||||||
|
Add `MktPair.fqme` property for symbol resolution
|
||||||
|
```
|
||||||
|
|
||||||
|
### With module prefix
|
||||||
|
```
|
||||||
|
.ib.feed: trim bars frame to `start_dt`
|
||||||
|
```
|
||||||
|
|
||||||
|
### Casual fix
|
||||||
|
```
|
||||||
|
Woops, compare against first-dt in `.ib.feed` bars frame
|
||||||
|
```
|
||||||
|
|
||||||
|
### With body using "Also,"
|
||||||
|
```
|
||||||
|
Drop `poetry` for `uv` in dev workflow
|
||||||
|
|
||||||
|
Also,
|
||||||
|
- update deps in `pyproject.toml`
|
||||||
|
- add `uv sync` to CI pipeline
|
||||||
|
- remove old `poetry.lock`
|
||||||
|
```
|
||||||
|
|
||||||
|
### With implementation details
|
||||||
|
```
|
||||||
|
Factor position tracking into `Position` dataclass
|
||||||
|
|
||||||
|
Deats,
|
||||||
|
- move calc logic from `brokerd` to `.accounting`
|
||||||
|
- add `norm_trade()` helper for broker normalization
|
||||||
|
- use `MktPair.fqme` for consistent symbol refs
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Analysis date:** 2026-01-27
|
||||||
|
**Commits analyzed:** 500 from piker repository
|
||||||
|
**Maintained by:** Tyler Goodlet
|
||||||
|
|
@ -0,0 +1,291 @@
|
||||||
|
# Test Harness Reference: piker
|
||||||
|
|
||||||
|
This repository-local file supplements the canonical `/run-tests` skill.
|
||||||
|
Keep shared execution, worktree, failure-inspection, and cleanup policy in the
|
||||||
|
canonical `SKILL.md`; keep Piker commands, paths, fixtures, and known outcomes
|
||||||
|
here.
|
||||||
|
|
||||||
|
## Project And Environment
|
||||||
|
|
||||||
|
- Project/import: `piker`
|
||||||
|
- Test root: `tests/`
|
||||||
|
- Supported Python: `>=3.12,<3.14`
|
||||||
|
- Preferred complete environment: worktree-local `py313` inside the current
|
||||||
|
`nix develop` shell
|
||||||
|
- The flake shell pins CPython 3.13 and sets
|
||||||
|
`UV_PROJECT_ENVIRONMENT=py313`.
|
||||||
|
- Verify the interpreter, package resolution, and dependency import before
|
||||||
|
running tests. A bare `py313` may lack the Qt binding supplied by Nix.
|
||||||
|
|
||||||
|
Use an already-provisioned `py313` only when `import piker` succeeds:
|
||||||
|
|
||||||
|
```text
|
||||||
|
py313/bin/python -m pytest -p no:xonsh
|
||||||
|
```
|
||||||
|
|
||||||
|
If direct environment paths are unavailable, an existing uv environment can
|
||||||
|
be used without changing it, subject to the same import check:
|
||||||
|
|
||||||
|
```text
|
||||||
|
UV_PROJECT_ENVIRONMENT=py313 uv run --frozen --no-sync python -m pytest -p no:xonsh
|
||||||
|
```
|
||||||
|
|
||||||
|
Ask before running provisioning commands such as:
|
||||||
|
|
||||||
|
```text
|
||||||
|
UV_PROJECT_ENVIRONMENT=py313 uv sync --dev --all-extras --no-group lint
|
||||||
|
nix develop
|
||||||
|
nix-shell default.nix
|
||||||
|
```
|
||||||
|
|
||||||
|
`nix develop` is the current Wayland/Qt 6 shell. `default.nix` is the current
|
||||||
|
X11 shell. Do not use `develop.nix` for current testing; it retains the old
|
||||||
|
Python 3.11, Poetry, and Qt 5 stack.
|
||||||
|
|
||||||
|
The current root-checkout `py313` resolves `piker` locally but fails
|
||||||
|
`import piker` outside Nix because PyQtGraph cannot import PyQt or PySide. Do
|
||||||
|
not treat that environment as test-ready and do not enter `nix develop`
|
||||||
|
without approval: its shell hook may recreate and sync `py313`.
|
||||||
|
|
||||||
|
Plain `uv sync` does not include the testing group. The `dbs` dependency group
|
||||||
|
is also absent from normal dev-shell provisioning.
|
||||||
|
|
||||||
|
## Commands
|
||||||
|
|
||||||
|
Base command in the preferred environment:
|
||||||
|
|
||||||
|
```text
|
||||||
|
py313/bin/python -m pytest -p no:xonsh
|
||||||
|
```
|
||||||
|
|
||||||
|
The explicit `-p no:xonsh` is required. The tracked comments-only
|
||||||
|
`pytest.ini` takes precedence over `pyproject.toml`, so the intended
|
||||||
|
`addopts = "-p no:xonsh"` and `testpaths = ["tests"]` are inactive.
|
||||||
|
Always pass a test path or node ID explicitly.
|
||||||
|
|
||||||
|
Package-resolution check that does not import Piker's dependencies:
|
||||||
|
|
||||||
|
```text
|
||||||
|
py313/bin/python -c 'import importlib.util, pathlib, sys; root = pathlib.Path.cwd().resolve(); spec = importlib.util.find_spec("piker"); mod = pathlib.Path(spec.origin).resolve(); print(sys.executable); print(mod); assert mod.is_relative_to(root)'
|
||||||
|
```
|
||||||
|
|
||||||
|
Dependency import check, required before collection or execution:
|
||||||
|
|
||||||
|
```text
|
||||||
|
py313/bin/python -c 'import pathlib, piker, sys; root = pathlib.Path.cwd().resolve(); mod = pathlib.Path(piker.__file__).resolve(); print(sys.executable); print(mod); assert mod.is_relative_to(root)'
|
||||||
|
```
|
||||||
|
|
||||||
|
Safe core collection check:
|
||||||
|
|
||||||
|
```text
|
||||||
|
py313/bin/python -m pytest -p no:xonsh -q --collect-only tests/test_watchlists.py tests/test_accounting.py tests/test_services.py tests/test_ems.py tests/test_feeds.py tests/test_cli.py
|
||||||
|
```
|
||||||
|
|
||||||
|
Default first-pass flags are `-q -x --tb=short --no-header` unless the user
|
||||||
|
requests otherwise. For actor-heavy tests, use one file or node per process
|
||||||
|
with an outer timeout:
|
||||||
|
|
||||||
|
```text
|
||||||
|
timeout -k 5 300 py313/bin/python -m pytest -p no:xonsh -q <one-file-or-node>
|
||||||
|
```
|
||||||
|
|
||||||
|
If an actor-heavy command exits `124` or `143`, retry that exact command once
|
||||||
|
and report both attempts. Never convert a retry pass into an unconditional
|
||||||
|
pass, and do not retry assertion, import, collection, or configuration
|
||||||
|
failures.
|
||||||
|
|
||||||
|
## Scope And Path Resolution
|
||||||
|
|
||||||
|
Resolve bare test filenames beneath `tests/`. Preserve complete node IDs and
|
||||||
|
apply `-k` only within explicitly selected paths. There is no marker-based
|
||||||
|
offline/full-suite split, so never use `pytest tests` as a deterministic
|
||||||
|
default.
|
||||||
|
|
||||||
|
Deterministic or local first-pass targets:
|
||||||
|
|
||||||
|
- `tests/test_watchlists.py`
|
||||||
|
- `tests/test_storage_audit.py`
|
||||||
|
- `tests/test_store_cli.py`
|
||||||
|
- `tests/test_backfill_audit_snippet.py`
|
||||||
|
- `tests/test_ib_history.py`
|
||||||
|
- `tests/test_ib_method_proxy.py`
|
||||||
|
- `tests/test_history_backfill.py`
|
||||||
|
- `tests/test_ldshm.py`
|
||||||
|
- `tests/test_accounting.py::test_account_file_default_empty`
|
||||||
|
- `tests/test_services.py::test_runtime_boot`
|
||||||
|
- `tests/test_services.py::test_datad_spawn`
|
||||||
|
- `tests/test_ems.py::test_ems_err_on_bad_broker`
|
||||||
|
|
||||||
|
Require explicit authorization before running:
|
||||||
|
|
||||||
|
- `tests/test_feeds.py` - live Binance/Kraken feeds;
|
||||||
|
- `tests/test_services.py::test_ensure_datafeed_actors` - live Kraken feed;
|
||||||
|
- `tests/test_services.py::test_ensure_ems_in_paper_actors` - paper EMS with
|
||||||
|
live Kraken symbology/feed access;
|
||||||
|
- `tests/test_ems.py::test_multi_fill_positions` - live backend setup and
|
||||||
|
persisted state;
|
||||||
|
- `tests/test_accounting.py::test_paper_ledger_position_calcs` - tracked
|
||||||
|
fixtures plus possible live symcache generation;
|
||||||
|
- `tests/test_accounting.py::test_ib_account_with_duplicated_mktids` - active
|
||||||
|
broker/account configuration and state writes;
|
||||||
|
- `tests/test_dpi_font.py` - Qt/UI import and user-config side effects;
|
||||||
|
- `tests/test_docker_services.py` - optional dependencies and containers;
|
||||||
|
- `tests/test_questrade.py` - obsolete credentialed imports.
|
||||||
|
|
||||||
|
`tests/test_cli.py` is currently hard-skipped. It is not an active CLI
|
||||||
|
regression gate.
|
||||||
|
|
||||||
|
Never execute `piker store anal` or `piker store shm --write-parquet`
|
||||||
|
as tests. They are mutating or interactive operational commands.
|
||||||
|
|
||||||
|
## Project-Specific Flags And Backend Matrix
|
||||||
|
|
||||||
|
| Flag | Purpose |
|
||||||
|
|---|---|
|
||||||
|
| `--ll LEVEL` | Piker log level |
|
||||||
|
| `--confdir PATH` | Override `piker.config._config_dir` |
|
||||||
|
| `--spawn-backend trio|mp_spawn|mp_forkserver` | Tractor process backend |
|
||||||
|
| `--tpt-proto PROTO` | Tractor transport; one protocol per session |
|
||||||
|
| `--tpdb` / `--debug-mode` | Tractor plugin debug mode |
|
||||||
|
| `--pdb` | Standard pytest debugger |
|
||||||
|
| `-s` | No capture; required with `--pdb` and `open_test_pikerd` |
|
||||||
|
|
||||||
|
Do not invent `network`, `offline`, `docker`, `gui`, or `broker` markers; none
|
||||||
|
currently exists. `CI=1` is not an offline selector: feed tests still leave a
|
||||||
|
live Kraken case enabled. Current Piker tests exercise TCP; do not assume the
|
||||||
|
whole suite supports UDS merely because the Tractor plugin exposes it.
|
||||||
|
|
||||||
|
## Fixture Invariants
|
||||||
|
|
||||||
|
- The session `confdir` fixture does nothing unless `--confdir` is passed.
|
||||||
|
Its claimed `tests/data` fallback is not implemented and that directory is
|
||||||
|
absent.
|
||||||
|
- Function-scoped `tmpconfdir` changes process-global config state and does
|
||||||
|
not restore the previous path. Use separate pytest processes when
|
||||||
|
diagnosing state leakage.
|
||||||
|
- `open_test_pikerd` passes the temporary config path to child actors through
|
||||||
|
`tractor_runtime_overrides`.
|
||||||
|
- `tests/_inputs/trades_binance_paper.toml` and
|
||||||
|
`tests/_inputs/account.binance.paper.toml` are used in place. Accounting
|
||||||
|
contexts can write them on exit. Inspect `git diff -- tests/_inputs` after
|
||||||
|
any selected accounting case.
|
||||||
|
- Importing `tests/test_dpi_font.py` constructs module-global font objects
|
||||||
|
before fixtures can isolate config. If explicitly requested, isolate
|
||||||
|
`XDG_CONFIG_HOME` before Python starts and use the proper Qt/Nix shell.
|
||||||
|
- Piker and the installed Tractor pytest plugin do not provide a
|
||||||
|
repository-local process or socket reaper. Never apply historical broad
|
||||||
|
`pkill -f tractor._child` guidance automatically.
|
||||||
|
- The function-scoped autouse `shm_leak_tracker` fixture wraps Tractor's
|
||||||
|
current-process `SharedMemory` factory. It tracks only successful
|
||||||
|
`create=True` calls, restores the pre-test `_known_tokens` cache, and
|
||||||
|
unlinks exact surviving names before failing the leaking test. It never
|
||||||
|
scans `/dev/shm` or unlinks attachments created by another process.
|
||||||
|
|
||||||
|
## Test Layout
|
||||||
|
|
||||||
|
```text
|
||||||
|
tests/
|
||||||
|
conftest.py Piker options, config fixtures, Tractor plugin
|
||||||
|
_inputs/ tracked ledger/account fixtures
|
||||||
|
test_accounting.py config, ledgers, accounts, and position math
|
||||||
|
test_cli.py legacy CLI suite; hard-skipped
|
||||||
|
test_docker_services.py container integrations; optional deps, skipped
|
||||||
|
test_dpi_font.py Qt DPI/font behavior
|
||||||
|
test_ems.py actor, EMS, and paper-position behavior
|
||||||
|
test_feeds.py live Binance/Kraken feeds and shared memory
|
||||||
|
test_ib_history.py deterministic IB history request formatting
|
||||||
|
test_ib_method_proxy.py deterministic IB asyncio proxy routing
|
||||||
|
test_history_backfill.py deterministic history/SHM orchestration
|
||||||
|
test_ldshm.py SHM unpublished-slot guard
|
||||||
|
test_questrade.py obsolete credentialed tests; skipped
|
||||||
|
test_services.py pikerd/datad/feed/EMS actor lifecycle
|
||||||
|
test_store_cli.py storage command help and diagnostics UX
|
||||||
|
test_storage_audit.py read-only NativeDB audit and JSON CLI
|
||||||
|
test_backfill_audit_snippet.py
|
||||||
|
disposable xonsh qualification helpers
|
||||||
|
test_watchlists.py deterministic watchlist JSON operations
|
||||||
|
```
|
||||||
|
|
||||||
|
## Change-To-Test Mapping
|
||||||
|
|
||||||
|
| Changed area | Run first | Caveat |
|
||||||
|
|---|---|---|
|
||||||
|
| `piker/watchlists/` | `tests/test_watchlists.py` | CLI suite is skipped |
|
||||||
|
| `piker/storage/_audit.py`, `piker/storage/cli.py` | `tests/test_storage_audit.py` | direct Typer app, no actor |
|
||||||
|
| `piker/storage/cli.py` command UX | `tests/test_store_cli.py` | fake SHM/runtime, no mutation |
|
||||||
|
| `snippets/nativedb_backfill_audit.xsh` | `tests/test_backfill_audit_snippet.py` | disposable paths only |
|
||||||
|
| `piker/brokers/ib/api.py`, `feed.py` history | `tests/test_ib_history.py` | fake client, no network |
|
||||||
|
| `piker/brokers/ib/api.py` method proxy | `tests/test_ib_method_proxy.py` | fake channel, no network |
|
||||||
|
| `piker/tsp/_history.py` | `tests/test_history_backfill.py` | fake provider/storage/SHM |
|
||||||
|
| `piker/storage/cli.py` SHM null-slot guard | `tests/test_ldshm.py` | synthetic timestamps, no SHM mutation |
|
||||||
|
| `piker/config.py` | `test_account_file_default_empty` | root-network test has a known mismatch |
|
||||||
|
| `piker/accounting/` | targeted accounting node | some cases use live/configured state |
|
||||||
|
| `piker/ui/_style.py`, `piker/ui/qt.py` | `tests/test_dpi_font.py` | GUI/config-isolated opt-in |
|
||||||
|
| `piker/service/_actor_runtime.py`, `_registry.py`, `_mngr.py` | `test_runtime_boot` | then `test_datad_spawn` |
|
||||||
|
| `piker/service/`, `piker/data/_daemon.py` | `test_datad_spawn` | feed lifecycle cases are live |
|
||||||
|
| `piker/data/feed.py`, `flows.py`, `_sharedmem.py`, `_sampling.py` | collect first | feed execution needs live permission |
|
||||||
|
| `piker/clearing/` | `test_ems_err_on_bad_broker` | multi-fill case is live/persisted |
|
||||||
|
| `piker/brokers/binance/`, `kraken/` | selected feed/accounting node | live network |
|
||||||
|
| `piker/brokers/ib/` | duplicated-market-ID node | controlled account config required |
|
||||||
|
| Docker/service adapters | `tests/test_docker_services.py` | optional deps and containers |
|
||||||
|
| project, lock, or Nix files | import check and safe collection | full collection is not safe by default |
|
||||||
|
|
||||||
|
Prefer deterministic filesystem/config tests, then local actor-runtime nodes,
|
||||||
|
then explicitly approved live broker, GUI, or container coverage.
|
||||||
|
|
||||||
|
## Quick Checks
|
||||||
|
|
||||||
|
```text
|
||||||
|
py313/bin/python -c 'import importlib.util, pathlib, sys; root = pathlib.Path.cwd().resolve(); spec = importlib.util.find_spec("piker"); mod = pathlib.Path(spec.origin).resolve(); print(sys.executable); print(mod); assert mod.is_relative_to(root)'
|
||||||
|
py313/bin/python -c 'import pathlib, piker, sys; root = pathlib.Path.cwd().resolve(); mod = pathlib.Path(piker.__file__).resolve(); print(sys.executable); print(mod); assert mod.is_relative_to(root)'
|
||||||
|
py313/bin/python -m pytest -p no:xonsh -q tests/test_watchlists.py
|
||||||
|
py313/bin/python -m pytest -p no:xonsh -q tests/test_accounting.py::test_account_file_default_empty
|
||||||
|
timeout -k 5 300 py313/bin/python -m pytest -p no:xonsh -q tests/test_services.py::test_runtime_boot
|
||||||
|
timeout -k 5 300 py313/bin/python -m pytest -p no:xonsh -q tests/test_services.py::test_datad_spawn
|
||||||
|
timeout -k 5 300 py313/bin/python -m pytest -p no:xonsh -q tests/test_ems.py::test_ems_err_on_bad_broker
|
||||||
|
```
|
||||||
|
|
||||||
|
## Known Outcomes
|
||||||
|
|
||||||
|
- The current root-checkout `py313` fails `import piker` outside the Nix shell
|
||||||
|
with `ImportError: PyQtGraph requires one of PyQt5, PyQt6, PySide2 or
|
||||||
|
PySide6`. This is an incomplete environment, not an application regression.
|
||||||
|
- `tests/test_accounting.py::test_root_conf_networking_section` currently
|
||||||
|
expects `network.tsdb`, which is absent from the tracked config template.
|
||||||
|
Match the current `KeyError: 'tsdb'` before classifying it as the known
|
||||||
|
repository mismatch.
|
||||||
|
- `tests/test_docker_services.py` is marked skipped but imports
|
||||||
|
`elasticsearch` first. Without the `dbs` group it fails collection rather
|
||||||
|
than skipping.
|
||||||
|
- `tests/test_questrade.py` is marked skipped but imports undeclared `asks`
|
||||||
|
through the legacy broker module before marks apply.
|
||||||
|
- `test_open_orders_reloaded` and `test_dark_order_clearing` in
|
||||||
|
`tests/test_ems.py` contain only ellipsis bodies. A pass does not verify the
|
||||||
|
named behavior.
|
||||||
|
- Treat `.pytest_cache` feed IDs using old FQME forms as stale historical
|
||||||
|
cache, not current known failures.
|
||||||
|
|
||||||
|
Do not classify every `TooSlowError`, timeout, or child survivor as the known
|
||||||
|
Tractor teardown wedge. Match the selected node and the documented
|
||||||
|
second-runtime/lingering-child signature.
|
||||||
|
|
||||||
|
## Tractor Runtime Notes
|
||||||
|
|
||||||
|
The suite loads `tractor._testing.pytest`. Defaults are the `trio` spawn
|
||||||
|
backend and TCP transport. Registry addresses are normally session-unique,
|
||||||
|
except `tests/test_services.py::test_runtime_boot`, which binds
|
||||||
|
`127.0.0.1:6666`. Check that fixed port only for that node; ordinary tests do
|
||||||
|
not require Piker's production `127.0.0.1:6116` registry address.
|
||||||
|
|
||||||
|
Current repository concurrency notes document an intermittent second
|
||||||
|
in-process `pikerd` boot wedge with a lingering broker child and unread parent
|
||||||
|
IPC bytes. Use the outer timeout for actor-heavy nodes. Retry an exact command
|
||||||
|
once only after status `124` or `143`, and report both attempts.
|
||||||
|
|
||||||
|
Ordinary actor tests support normal capture. Diagnose a capture-dependent hang
|
||||||
|
by retrying only the exact node with `-s`. Standard `--pdb` with
|
||||||
|
`open_test_pikerd` requires `-s`; Tractor's `--tpdb` is a separate option.
|
||||||
|
|
||||||
|
After abnormal exit, inspect only descendants, sockets, and shared-memory
|
||||||
|
objects attributable to the exact pytest session. Ask before signaling or
|
||||||
|
unlinking anything.
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
{"version": 1, "backend": "neutral"}
|
||||||
|
|
@ -183,6 +183,7 @@ docs/conversations/
|
||||||
# END ai.skillz: direct:symlink:opencode:code-review
|
# END ai.skillz: direct:symlink:opencode:code-review
|
||||||
|
|
||||||
# BEGIN ai.skillz: runtime:code-review-changes
|
# BEGIN ai.skillz: runtime:code-review-changes
|
||||||
|
.ai/state/review/
|
||||||
.claude/review_context.md
|
.claude/review_context.md
|
||||||
.claude/review_regression.md
|
.claude/review_regression.md
|
||||||
.claude/review_replies/
|
.claude/review_replies/
|
||||||
|
|
@ -197,6 +198,9 @@ docs/conversations/
|
||||||
# END ai.skillz: direct:symlink:opencode:code-review-changes
|
# END ai.skillz: direct:symlink:opencode:code-review-changes
|
||||||
|
|
||||||
# BEGIN ai.skillz: runtime:commit-msg
|
# BEGIN ai.skillz: runtime:commit-msg
|
||||||
|
.ai/state/commit-msg/
|
||||||
|
.ai/state/migrations/
|
||||||
|
.ai/commit-msg/conf.toml
|
||||||
.claude/skills/commit-msg/msgs/
|
.claude/skills/commit-msg/msgs/
|
||||||
.claude/git_commit_msg_LATEST.md
|
.claude/git_commit_msg_LATEST.md
|
||||||
# END ai.skillz: runtime:commit-msg
|
# END ai.skillz: runtime:commit-msg
|
||||||
|
|
@ -274,6 +278,8 @@ docs/conversations/
|
||||||
# END ai.skillz: direct:symlink:opencode:plan-io
|
# END ai.skillz: direct:symlink:opencode:plan-io
|
||||||
|
|
||||||
# BEGIN ai.skillz: runtime:pr-msg
|
# BEGIN ai.skillz: runtime:pr-msg
|
||||||
|
.ai/state/pr-msg/
|
||||||
|
.ai/pr-msg/conf.toml
|
||||||
.claude/skills/pr-msg/msgs/
|
.claude/skills/pr-msg/msgs/
|
||||||
.claude/skills/pr-msg/pr_msg_LATEST.md
|
.claude/skills/pr-msg/pr_msg_LATEST.md
|
||||||
# END ai.skillz: runtime:pr-msg
|
# END ai.skillz: runtime:pr-msg
|
||||||
|
|
@ -397,3 +403,92 @@ docs/conversations/
|
||||||
# BEGIN ai.skillz: direct:symlink:opencode:command:yt-url-lookup
|
# BEGIN ai.skillz: direct:symlink:opencode:command:yt-url-lookup
|
||||||
/.opencode/commands/yt-url-lookup.md
|
/.opencode/commands/yt-url-lookup.md
|
||||||
# END ai.skillz: direct:symlink:opencode:command:yt-url-lookup
|
# END ai.skillz: direct:symlink:opencode:command:yt-url-lookup
|
||||||
|
# BEGIN ai.skillz: direct:symlink:agents:gish
|
||||||
|
/.agents/skills/gish
|
||||||
|
# END ai.skillz: direct:symlink:agents:gish
|
||||||
|
|
||||||
|
# BEGIN ai.skillz: direct:symlink:agents:resolve-conflicts
|
||||||
|
/.agents/skills/resolve-conflicts
|
||||||
|
# END ai.skillz: direct:symlink:agents:resolve-conflicts
|
||||||
|
|
||||||
|
# BEGIN ai.skillz: direct:symlink:agents:git-mgmt
|
||||||
|
/.agents/skills/git-mgmt
|
||||||
|
# END ai.skillz: direct:symlink:agents:git-mgmt
|
||||||
|
|
||||||
|
# BEGIN ai.skillz: direct:symlink:agents:open-wkt
|
||||||
|
/.agents/skills/open-wkt
|
||||||
|
# END ai.skillz: direct:symlink:agents:open-wkt
|
||||||
|
|
||||||
|
# BEGIN ai.skillz: direct:symlink:agents:run-tests
|
||||||
|
/.agents/skills/run-tests
|
||||||
|
# END ai.skillz: direct:symlink:agents:run-tests
|
||||||
|
|
||||||
|
# BEGIN ai.skillz: direct:symlink:agents:close-wkt
|
||||||
|
/.agents/skills/close-wkt
|
||||||
|
# END ai.skillz: direct:symlink:agents:close-wkt
|
||||||
|
|
||||||
|
# BEGIN ai.skillz: direct:symlink:agents:code-review
|
||||||
|
/.agents/skills/code-review
|
||||||
|
# END ai.skillz: direct:symlink:agents:code-review
|
||||||
|
|
||||||
|
# BEGIN ai.skillz: direct:symlink:agents:code-nav-refs
|
||||||
|
/.agents/skills/code-nav-refs
|
||||||
|
# END ai.skillz: direct:symlink:agents:code-nav-refs
|
||||||
|
|
||||||
|
# BEGIN ai.skillz: direct:symlink:agents:code-review-changes
|
||||||
|
/.agents/skills/code-review-changes
|
||||||
|
# END ai.skillz: direct:symlink:agents:code-review-changes
|
||||||
|
|
||||||
|
# BEGIN ai.skillz: direct:symlink:agents:commit-msg
|
||||||
|
/.agents/skills/commit-msg
|
||||||
|
# END ai.skillz: direct:symlink:agents:commit-msg
|
||||||
|
|
||||||
|
# BEGIN ai.skillz: direct:symlink:agents:commit-plan
|
||||||
|
/.agents/skills/commit-plan
|
||||||
|
# END ai.skillz: direct:symlink:agents:commit-plan
|
||||||
|
|
||||||
|
# BEGIN ai.skillz: direct:symlink:agents:dep-supersede-scan
|
||||||
|
/.agents/skills/dep-supersede-scan
|
||||||
|
# END ai.skillz: direct:symlink:agents:dep-supersede-scan
|
||||||
|
|
||||||
|
# BEGIN ai.skillz: direct:symlink:agents:harness-perf
|
||||||
|
/.agents/skills/harness-perf
|
||||||
|
# END ai.skillz: direct:symlink:agents:harness-perf
|
||||||
|
|
||||||
|
# BEGIN ai.skillz: direct:symlink:agents:inter-skill-review
|
||||||
|
/.agents/skills/inter-skill-review
|
||||||
|
# END ai.skillz: direct:symlink:agents:inter-skill-review
|
||||||
|
|
||||||
|
# BEGIN ai.skillz: direct:symlink:agents:opencode-cleaning
|
||||||
|
/.agents/skills/opencode-cleaning
|
||||||
|
# END ai.skillz: direct:symlink:agents:opencode-cleaning
|
||||||
|
|
||||||
|
# BEGIN ai.skillz: direct:symlink:agents:plan-io
|
||||||
|
/.agents/skills/plan-io
|
||||||
|
# END ai.skillz: direct:symlink:agents:plan-io
|
||||||
|
|
||||||
|
# BEGIN ai.skillz: direct:symlink:agents:pr-msg
|
||||||
|
/.agents/skills/pr-msg
|
||||||
|
# END ai.skillz: direct:symlink:agents:pr-msg
|
||||||
|
|
||||||
|
# BEGIN ai.skillz: direct:symlink:agents:prompt-io
|
||||||
|
/.agents/skills/prompt-io
|
||||||
|
# END ai.skillz: direct:symlink:agents:prompt-io
|
||||||
|
|
||||||
|
# BEGIN ai.skillz: direct:symlink:agents:py-codestyle
|
||||||
|
/.agents/skills/py-codestyle
|
||||||
|
# END ai.skillz: direct:symlink:agents:py-codestyle
|
||||||
|
|
||||||
|
# BEGIN ai.skillz: direct:symlink:agents:taken-export
|
||||||
|
/.agents/skills/taken-export
|
||||||
|
# END ai.skillz: direct:symlink:agents:taken-export
|
||||||
|
|
||||||
|
# BEGIN ai.skillz: direct:symlink:agents:yt-url-lookup
|
||||||
|
/.agents/skills/yt-url-lookup
|
||||||
|
# END ai.skillz: direct:symlink:agents:yt-url-lookup
|
||||||
|
|
||||||
|
# BEGIN ai.skillz: workflow-state
|
||||||
|
/.ai/state/
|
||||||
|
/.ai/commit-msg/conf.toml
|
||||||
|
/.ai/pr-msg/conf.toml
|
||||||
|
# END ai.skillz: workflow-state
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
---
|
||||||
|
model: openai/gpt-5.6-sol
|
||||||
|
service: opencode
|
||||||
|
session: unavailable
|
||||||
|
timestamp: 2026-09-07T21:40:00Z
|
||||||
|
git_ref: 9115d24
|
||||||
|
scope: config
|
||||||
|
substantive: true
|
||||||
|
raw_file: 20260907T214000Z_9115d24_prompt_io.raw.md
|
||||||
|
---
|
||||||
|
|
||||||
|
## Prompt
|
||||||
|
|
||||||
|
Deploy the provider-neutral `.agents` skill tree for Codex first and
|
||||||
|
then migrate Piker's workflow state without losing archived helpers.
|
||||||
|
|
||||||
|
## Response summary
|
||||||
|
|
||||||
|
Deployed 21 ignored `.agents/skills` links, copied 132 legacy runtime
|
||||||
|
files into `.ai/state`, selected the neutral backend, and preserved the
|
||||||
|
original archive and staged `ruff.toml` change.
|
||||||
|
|
||||||
|
## Files changed
|
||||||
|
|
||||||
|
- `.gitignore` - ignore shared links and generated neutral state.
|
||||||
|
- `.ai/workflow-state.json` - select the neutral backend.
|
||||||
|
- `.ai/commit-msg/style-guide-reference.md` - port commit guidance.
|
||||||
|
- `.ai/run-tests/test-harness-reference.md` - port test guidance.
|
||||||
|
|
||||||
|
## Human edits
|
||||||
|
|
||||||
|
The human prioritized immediate Codex deployment and directed helper
|
||||||
|
archives to migrate as opaque runtime data instead of blocking the
|
||||||
|
operation. No direct source-line edits were made by the human.
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
---
|
||||||
|
model: openai/gpt-5.6-sol
|
||||||
|
service: opencode
|
||||||
|
timestamp: 2026-09-07T21:40:00Z
|
||||||
|
git_ref: 9115d24
|
||||||
|
diff_cmd: git diff HEAD~1..HEAD
|
||||||
|
---
|
||||||
|
|
||||||
|
Deploy all shared `ai.skillz` skills through `.agents/skills` for
|
||||||
|
Codex, then migrate Piker's generated workflow state from the legacy
|
||||||
|
Claude layout to provider-neutral `.ai/state` storage.
|
||||||
|
|
||||||
|
Preserve every legacy source and the existing staged `ruff.toml`
|
||||||
|
change. Commit only the neutral backend selection, repository guidance,
|
||||||
|
ignore rules, and this provenance record.
|
||||||
Loading…
Reference in New Issue