Skip to content

docs: refresh AGENTS.md + docs/* for verbose flag + on_wire callback#7

Merged
jramos merged 4 commits into
developfrom
docs/verbose-onwire-refresh
Apr 24, 2026
Merged

docs: refresh AGENTS.md + docs/* for verbose flag + on_wire callback#7
jramos merged 4 commits into
developfrom
docs/verbose-onwire-refresh

Conversation

@jramos
Copy link
Copy Markdown
Owner

@jramos jramos commented Apr 24, 2026

Summary

The recent CLI -v/--verbose flag, the library-level on_wire: callback on Miner.new / MinerPool.new, and the new docs/logging.md stub had landed in code, README, and CHANGELOG — but the long-form docs and AGENTS.md still described the pre-verbose-flag world.

Three commits, one surface each:

  1. docs(agents): document verbose flag, on_wire callback, logging.md — AGENTS.md stack overview gains a "Logging posture" paragraph; structural-facts list gains a safe_on_wire entry; sandbox block demonstrates -v; deep-context table routes to docs/logging.md.
  2. docs(interfaces,logging): document -v/--verbose and on_wire: hookMiner.new and MinerPool.new signatures in interfaces.md show on_wire: usage; a new "Flags" table documents -v/--verbose with the actual direction prefixes (>>>, <<<, <<< (repaired)). Drive-by fix in docs/logging.md: the initial stub named non-existent error classes (SocketReadTimeout, ProtocolError) — replaced with the actual public hierarchy (Error, ConnectionError, TimeoutError, ApiError) and the pool's failure-capture contract.
  3. docs(components,workflows): document on_wire: hook + CLI -v wiringMiner / MinerPool / bin/cgminer_api_client component entries pick up the constructor shapes and the CLI flag's mutex-serialized stderr writer with EPIPE/IOError defenses; the single-miner sequence diagram shows the three safe_on_wire call sites.

Docs-only, no code changes.

Test plan

  • bundle exec rake green (spec + rubocop; coverage 99.69%).
  • git diff --stat origin/develop.. — 5 files touched, all under docs/ or AGENTS.md.
  • Eyeball the rendered Mermaid sequence diagram on the PR preview (single-miner request flow).

jramos added 4 commits April 23, 2026 20:44
Add a "Logging posture" paragraph to the stack overview covering the
silent-by-design library, the CLI -v/--verbose flag, and the on_wire:
callback kwarg on Miner.new / MinerPool.new with its three directions
(:request, :response, :response_repaired). Add a structural fact
noting on_wire is best-effort telemetry wrapped in safe_on_wire so a
buggy callback cannot break a query. Add -v usage to the manual
sandbox block and a docs/logging.md row to the deep-context table.
Refresh the SLOC footprint to match post-verbose-flag reality.
Add on_wire: keyword-arg usage to Miner.new and MinerPool.new signatures
in interfaces.md; document the CLI -v/--verbose flag with its actual
direction prefixes (>>>, <<<, <<< (repaired)) and mutex-serialized write
behavior; cross-link to docs/logging.md for the full posture.

Fix error class references in logging.md — the stub's initial wording
named SocketReadTimeout / ProtocolError, which are not real classes.
Replace with the actual public hierarchy (Error, ConnectionError,
TimeoutError, ApiError) and describe the pool's failure-capture
contract. Add sections documenting the on_wire: library hook (three
directions, safe_on_wire swallowing) and the CLI flag (defensive
EPIPE/IOError handling so stderr closure doesn't break the query).
Add on_wire: kwarg to the Miner and MinerPool constructor summaries in
components.md; note that MinerPool forwards the callback into every
Miner it constructs. Describe safe_on_wire's three directions and
exception-swallowing contract. Update the bin/cgminer_api_client entry
to document the -v/--verbose flag and the mutex-serialized stderr
writer with EPIPE/IOError defenses.

In workflows.md, extend the single-miner request-flow sequence diagram
with the three safe_on_wire call sites (request / response /
response_repaired) and add a key observation pointing at logging.md.
Bash wrapper around npx @mermaid-js/mermaid-cli that extracts every
```mermaid block under docs/*.md and pipes each through the parser,
reporting Parse/Lexical errors. Exits non-zero on any failure so a
CI job can opt in later.

Not wired into bundle exec rake — first run pulls Puppeteer+Chromium
(~300MB) into ~/.npm/_npx, which is too heavy to impose on every test
cycle. Documented in AGENTS.md "Running tests and lint" as an opt-in
local check for docs PRs.

All five api_client diagrams validate clean — the monitor and manager
PRs in this docs-refresh round each caught real drift, so bundling
the same tool here keeps the three repos symmetric for future edits.
@jramos jramos merged commit bf44c13 into develop Apr 24, 2026
6 checks passed
@jramos jramos deleted the docs/verbose-onwire-refresh branch April 24, 2026 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant