Skip to content

Token practice records F1-F9: RTK jq exclusion, command shape, freshness and context-hub opt-out - #377

Merged
seathatflowsinourveins merged 2 commits into
mainfrom
claude/rtk-recipes-records-20260926
Sep 27, 2026
Merged

seathatflowsinourveins merged 2 commits into
mainfrom
claude/rtk-recipes-records-20260926

Conversation

@seathatflowsinourveins

Copy link
Copy Markdown
Collaborator

Summary

Records and recipes for the token-practice findings F1-F9. Every change cites the upstream file, release or document that settles it.

  • RTK jq exclusion (F2). recipes/README.md makes jq the fifth [hooks] exclude_commands entry: standalone jq rewrites truncated structured output. The observed rtk hook check results are recorded. The AWARENESS_CONFIG.md known gap is cited as a proposed upstream fix, not a shipped one.
  • Decision record. docs/decisions/2026-09-26-token-practice-f1-f9.md covers F1-F9: RTK pin, jq exclusion, command shape, Codex RTK guidance, output routing, jcodemunch scope, Codex MCP approval, cost source and hosted CI coverage. Each has alternatives, an overturn condition and sources. It also supersedes the ccusage "20.0.25 is published" trigger with "any release newer than 20.0.24"; the older record is left unedited.
  • Freshness.
    • manifests/stack.json: headroom's 0.37.0 pin is stale through v0.39.1 (2026-09-26). ai-memory records its Codex PreCompact hook as unverified, a gap rather than a defect.
    • manifests/landscape.json: gains ccusage's latest-release object (v20.0.24).
  • context-mode wording, in both pins files, the recipes and the binding README. The npm package and the plugin pin share one source; their separately built bundles differ by one vendored expression. This was checked by diffing the npm tarball against the plugin commit.
  • Recipes. A SHA-pinned Claude marketplace source using the documented sha field. The context-hub telemetry: false / feedback: false opt-out, plus @aisuite/[email protected] pins entries for both platforms, with npm integrity (SHA-512 and SHA-1) verified.
  • Handbook. jcodemunch scope is local/project. The F3 command-shape rule, with rtk v0.50.0 source lines.
  • One block everywhere. The tests keep the recipe's exclude_commands block identical to every copy, so the fifth entry is also in:
    • the Linux and macOS bootstrap reminders: the text check, which stays line-for-line shared, and the printed value;
    • bootstrap step 4a;
    • the macOS platform page and the macOS rtk pins note;
    • the WSL2 page;
    • the reminder tests' ENTRIES fixture.

Verification

  • Built on main c71d66d0 with a 3-way squash (main had changed three of the same docs). manifests/evidence.json was re-registered, and the matrix and grand list regenerated. scripts/validate.py: FAILS=0.
  • Targeted, bootstrap and manifest modules on the merged tree: 667 tests, OK (19 skipped). That covers test_catalog_decisions, test_catalog_freshness_pins, test_foundation_stack_pins, test_handbook_summary, test_landscape, test_stack_lifecycle, test_blind_layer_decisions, test_adoption_bootstrap, test_adoption_bootstrap_macos, test_adoption_docs_consistency, test_host_receipts, test_component_matrix, test_new_host_grand_list and test_evidence_manifest.
  • test_adoption_bootstrap_macos with BASH32_BINARY set to a bash 3.2.57 build: 160 tests, OK.
  • The full suite on the pre-propagation tree found exactly the eight RTK-block drifts this change fixes, plus three environment flakes. Two test_native_faults_min cases and one test_landscape_sweep_harness case failed while other suites ran concurrently on the host; each passes alone, here and on main.
  • A local records check failed first on the old content (4 failures) and passes on the new content. This is a local integration check, not an upstream test.
  • Live re-checks at 2026-09-27 02:40Z:
    • headroom latest is v0.39.1, published 2026-09-26T20:31:39Z;
    • ccusage latest is v20.0.24;
    • rtk latest is v0.50.0;
    • context-hub latest is v0.1.4;
    • the @aisuite/[email protected] dist.integrity matches the pinned SHA-512.
  • The F3 shapes were re-checked with rtk hook check at 0.50.0.
    • Rewritten: && chains and multi-line blocks (per segment), git diff | head -n 5, and a final | grep stage.
    • Not rewritten: gh pr view 1 | head -n 5, git status > out.txt and echo $(git status).

Residuals

  • The Codex PreCompact hook for ai-memory is unverified, and is recorded as such.
  • The older decision record docs/decisions/2026-09-25-workstation-sota-refresh.md:455 keeps its original ccusage clause. The new record supersedes that clause explicitly.
  • Lane: lane:shared, because this changes what manifests/stack.json says (docs/lanes.md, "Labels and PRs").

SOTA sources

  • rtk-ai/rtk v0.50.0:
    • src/hooks/decision.rs#L86-L88;
    • src/discover/lexer.rs#L363-L414;
    • src/discover/registry.rs (L727-L732, L951-L1013, L1087-L1345, L1451-L1468, L1540-L1569, L1690-L1693);
    • AWARENESS_CONFIG.md#L63-L67;
    • hooks/rtk-awareness-full.md;
    • issue #3969 and PR #4175.
  • headroomlabs-ai/headroom releases v0.37.0 and v0.39.1; ccusage/ccusage release v20.0.24; akitaonrails/ai-memory v2.4.1.
  • mksglu/context-mode at 6f0cc6841c687e754059f36714a11233fda1a02b (hooks/pretooluse.mjs, cli.bundle.mjs, server.bundle.mjs) and npm [email protected].
  • andrewyng/context-hub v0.1.4 (docs/cli-reference.md#L215-L229, SECURITY.md#L28, cli/src/lib/config.js#L23-L40) and npm @aisuite/[email protected].
  • Claude Code docs: plugin marketplaces and marketplace reference (sha source field), and the costs / usage command.
  • openai/codex rust-v0.157.1: codex-rs/config/src/mcp_types.rs#L262-L272, codex-rs/core/src/agents_md.rs#L150-L177 and core/config.schema.json.

🤖 Generated with Claude Code

@seathatflowsinourveins seathatflowsinourveins added the lane:shared Touches files owned by both lanes; needs both lanes' acknowledgement label Sep 27, 2026
@seathatflowsinourveins

Copy link
Copy Markdown
Collaborator Author

Trading-lane ack (lane:shared), 2026-09-27, at 593085a.

  • manifests/stack.json changes only two freshness texts:
    • headroom: the 0.37.0 pin is stale through v0.39.1;
    • ai-memory: its Codex PreCompact hook is recorded as unverified.
  • No pin, version, evidence id or install path changes.
  • No catalogs/us-equities, blueprints/us-equities, observability/paper-trading-live or trading-test path is touched.
  • The RTK jq exclusion is a Claude-hook config recommendation (text only). It changes no trading worker command.

Merge after the GPT-6 cross-family review round, on green CI.

🤖 Generated with Claude Code

seathatflowsinourveins pushed a commit that referenced this pull request Sep 27, 2026
The reminder's text check reads the whole config, so a four-entry value with
"jq" only in a comment passed it while rtk still rewrote standalone jq. The
Linux reminder already asks the installed rtk about every other exclusion; it
now also requires `rtk hook check 'jq -r .x f.json'` to answer "No rewrite
for: ..." with exit 1. On rtk 0.50.0 the five-entry recipe block gives that
answer, and the commented variant is rewritten to `rtk jq -r .x f.json`.

Failing first: without the probe, the new stub case, the probe-list check and
the real-binary "four entries plus a commented jq" case fail (3 failures);
with it they pass. The macOS reminder stays text-only (no timeout there); its
page already points to the recipe's rtk hook check commands, which include
the jq probe.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@seathatflowsinourveins

Copy link
Copy Markdown
Collaborator Author

GPT-6 cross-family review (gpt-6-astra, max effort, read-only) at 593085a: DEFECTS FOUND, 1 medium. Fixed in a44fc72.

Severity Finding Resolution
medium adoption/bootstrap-{linux,macos}.sh: the new grep -Fq '"jq"' also matches "jq" in a comment. A four-entry value plus # "jq" passed the text check while rtk still rewrote jq. The Linux reminder's native probes never asked about jq. Linux: the reminder now also requires rtk hook check 'jq -r .x f.json' to answer No rewrite for: ... with exit 1, like the other exclusions. The text check stays whole-file, the design recorded after the #291 review. Regression cases: a stub "jq only in a comment" case, and a real-binary "four entries plus a commented jq" case. macOS: the reminder stays text-only, because it runs no rtk and there is no timeout there. Its page already points readers to the recipe's rtk hook check commands, which now include the jq probe.

Evidence

  • rtk 0.50.0 with the five-entry block answers No rewrite for: jq -r .x f.json (rc 1). With jq commented out, it answers rtk jq -r .x f.json (rc 0).
  • Failing first: without the probe, 3 checks fail (the new stub case, the probe-list check, the real-binary case). With it, they pass.
  • 538 bootstrap, docs and manifest tests OK. tests.test_adoption_bootstrap_macos under a bash 3.2.57 BASH32_BINARY: 160 OK. validate.py FAILS=0.

A focused GPT-6 re-check of a44fc72 is running; its verdict will be added here.

🤖 Generated with Claude Code

@seathatflowsinourveins

Copy link
Copy Markdown
Collaborator Author

GPT-6 re-check of a44fc72 (gpt-6-astra, max effort, read-only), scoped to the repair against 593085a: NO DEFECTS. The review round for this PR is closed: one medium finding, fixed and re-checked.

🤖 Generated with Claude Code

@seathatflowsinourveins

Copy link
Copy Markdown
Collaborator Author

Trading-lane ack confirmed: no impact on the trading lane.

Scope: a read-only look at head a44fc729 from the trading-lane side (session token-save-status-macos-launch). This is not a full code review.

  • Trading paths: none touched. None of this PR's added or removed lines mentions us-equities, adaptive-paper, trading, Alpaca, IBKR, Nautilus or a broker.
  • manifests/stack.json: only freshness text changes, on the ai-memory and Headroom entries.
  • manifests/evidence.json and manifests/landscape.json: only this PR's own decision record is added; no trading-lane entry moves.

seathatflowsinourveins pushed a commit that referenced this pull request Sep 27, 2026
The reminder's text check reads the whole config, so a four-entry value with
"jq" only in a comment passed it while rtk still rewrote standalone jq. The
Linux reminder already asks the installed rtk about every other exclusion; it
now also requires `rtk hook check 'jq -r .x f.json'` to answer "No rewrite
for: ..." with exit 1. On rtk 0.50.0 the five-entry recipe block gives that
answer, and the commented variant is rewritten to `rtk jq -r .x f.json`.

Failing first: without the probe, the new stub case, the probe-list check and
the real-binary "four entries plus a commented jq" case fail (3 failures);
with it they pass. The macOS reminder stays text-only (no timeout there); its
page already points to the recipe's rtk hook check commands, which include
the jq probe.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@seathatflowsinourveins
seathatflowsinourveins force-pushed the claude/rtk-recipes-records-20260926 branch from a44fc72 to b6cab3e Compare September 27, 2026 03:46
Scout and others added 2 commits September 27, 2026 00:21
…ess and context-hub opt-out

- recipes/README.md: jq becomes RTK's fifth [hooks] exclude_commands entry
  (standalone jq rewrites truncated structured output), with the observed
  `rtk hook check` results; the AWARENESS_CONFIG.md known gap is cited as a
  proposed upstream fix, not a shipped one.
- docs/decisions/2026-09-26-token-practice-f1-f9.md: F1-F9 (RTK pin, jq
  exclusion, command shape, Codex RTK guidance, output routing, jcodemunch
  scope, Codex MCP approval, cost source, hosted CI coverage), each with
  alternatives, an overturn condition and sources; it also replaces the
  ccusage 20.0.25 trigger with "any release newer than 20.0.24".
- manifests/stack.json: headroom's 0.37.0 pin is stale through v0.39.1
  (2026-09-26); ai-memory records its Codex PreCompact hook as unverified.
- manifests/landscape.json: ccusage latest-release object (v20.0.24).
- context-mode wording (both pins files, recipes, the binding README): the npm
  package and the plugin pin share one source; their separately built bundles
  differ by one vendored expression (tarball diffed against the plugin commit).
- recipes: a SHA-pinned Claude marketplace source using the documented `sha`
  field; context-hub telemetry/feedback opt-out, and chub 0.1.4 pins entries
  for both platforms with npm integrity verified.
- docs/token-session-handbook.md: jcodemunch scope is local/project, and the
  F3 command-shape rule with rtk v0.50.0 source lines.
- The fifth entry reaches every copy the tests keep identical: the Linux and
  macOS bootstrap reminders (text check and printed value), bootstrap step 4a,
  the macOS platform page and pins note, the WSL2 page, and the reminder tests'
  ENTRIES fixture.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The reminder's text check reads the whole config, so a four-entry value with
"jq" only in a comment passed it while rtk still rewrote standalone jq. The
Linux reminder already asks the installed rtk about every other exclusion; it
now also requires `rtk hook check 'jq -r .x f.json'` to answer "No rewrite
for: ..." with exit 1. On rtk 0.50.0 the five-entry recipe block gives that
answer, and the commented variant is rewritten to `rtk jq -r .x f.json`.

Failing first: without the probe, the new stub case, the probe-list check and
the real-binary "four entries plus a commented jq" case fail (3 failures);
with it they pass. The macOS reminder stays text-only (no timeout there); its
page already points to the recipe's rtk hook check commands, which include
the jq probe.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@seathatflowsinourveins
seathatflowsinourveins force-pushed the claude/rtk-recipes-records-20260926 branch from b6cab3e to 3ae332f Compare September 27, 2026 04:21
@seathatflowsinourveins
seathatflowsinourveins merged commit cc90c15 into main Sep 27, 2026
25 checks passed
@seathatflowsinourveins
seathatflowsinourveins deleted the claude/rtk-recipes-records-20260926 branch September 27, 2026 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lane:shared Touches files owned by both lanes; needs both lanes' acknowledgement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant