Repository navigation
Instruction core: trim the always-loaded text of both clients; trading rules load only where they apply - #836
Conversation
…e displaced rules to their triggers The owner asked on 2026-10-07 for the always-loaded instruction files to be cut back to a curated core that keeps the research-first, upstream-as-source-of-truth philosophy, with displaced rules such as the trading rules moved to where they apply. The command center ruled the changed expectations the same day. Decision record: docs/decisions/2026-10-07-instruction-core.md. Sources - AGENTS.md: a shorter top rule, a "Where things are" pointer index and the repository's own rules (10,959 -> 7,294 bytes, 57 -> 34 lines). The standing sentences that both user-level blocks carry leave the root file, and its copy of the Codex routing paragraph becomes a pointer. - examples/claude-native/CLAUDE.md: four on-demand items leave, three pointers to one README anchor become one, and the Codex block's token-lane sentence is added as one bullet (11,905 -> 11,145 bytes, 59 -> 55 lines). - adoption/templates/codex.AGENTS.template.md: the web-research and queue-timing lines leave and the courier recipe moves to the workflow README behind one pointer (8,076 -> 7,418 bytes compact, 9,142 -> 8,484 rendered). - .claude/rules/trading.md (new): the root trading trigger, word for word, scoped by paths: to the trading lane's paths. - The Alpaca example leaves the first standing sentence on every surface. - Root CLAUDE.md is unchanged. Derived - Both carriers regenerated with tools/adoption/new_wsl_client_config.py --write-blocks (0 units left out; 55 of 55 and 72 of 72 lines stay). - adoption/scaffold/AGENTS.md takes the template's "Prefer..." line. Destination and contracts - The workflow README's mechanics section gains the courier recipe (12.txt, 485 bytes) and the upstream-practice citation sentence (13.txt, 319 bytes). - Contract 01 leaves contracts.json; 01.txt stays as its October 5 snapshot. Changed test expectations (five, each named in the decision record) - StandingRuleSurfacesTests: SURFACES loses root AGENTS.md (relaxed); the first standing sentence loses its example (changed). - PortableTopRuleTests relocation contracts: contract 01 removed (relaxed). - TemplateTests: TOP_RULE_SHA256 and PRE_RTK_SHA256 recomputed (changed). - STARTUP_BUDGET_BYTES: 24,458/20,103 -> 20,445/16,567 (tightened). The scopes, measured with the test's own startup_files, fall from 23,896 to 19,471 bytes (Claude) and from 20,101 to 15,778 (Codex); each ceiling is the measured scope plus 5%, rounded upward. Records: the new decision record with its SOTA sources, dated addenda in the 2026-10-05 budget decision and the 2026-09-30 rule-text record, and the regenerated instruction inventory at the tail of the 2026-10-02 record. No host file changes. manifests/evidence.json follows in the next commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e.json Hot-file protocol of docs/lanes.md: the base commit's manifest, then scripts/host_receipts.register_file for each changed file the manifest already lists (12), and for four new files: .claude/rules/trading.md, docs/decisions/2026-10-07-instruction-core.md and the passage fixtures 12.txt and 13.txt, following the registration of the instruction surfaces, of the 2026-10-06 record and of its dated fixtures. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ng lane's change request) Paper and broker operation, data acquisition and trading research mostly run outside the repository's paths, so a path-scoped rule does not load in the sessions that operate paper. The root file's Subtree rules line now says, for every session, that each coordinator unit names the north-star action it serves and that trading work of any kind reads blueprints/us-equities/AGENTS.md first, wherever it runs. The path-scoped rule stays for sessions working in the trading paths. Registry re-registered last. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…aded trading prerequisite Closes the test half of finding 1 of the cross-family read at 311e614: StandingRuleSurfacesTests gains a check that root AGENTS.md keeps the maintainer sentence, the clause that each coordinator unit names the north-star action it serves, and the sentence that trading work of any kind reads blueprints/us-equities/AGENTS.md first wherever it runs, and carries none of the dropped clauses. Registry re-registered last. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6650f41 to
bcc9f67
Compare
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bcc9f6778c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…e (review thread P2) The ceilings were measured scope + 5% from a first draft (19,471 and 15,778 bytes). The landing head measures 19,885 (Claude: block 11,411 + AGENTS.md 7,499 + CLAUDE.md 975) and 15,983 (Codex: block 8,484 + AGENTS.md 7,499) with the test's own PortableTopRuleTests.startup_files(), after the restored trading sentence and #833's CLAUDE.md pointer line. The ceilings become 20,880 and 16,783 (+5%, rounded up), and the decision record's table, totals and contract row 5 follow, with a note on why the figures moved. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Claude session native-agent-stack-5f: landing at head Observed main Required checks at this head: 7 pass . Unresolved review threads: 0. |
|
Claude session native-agent-stack-5f: post-merge observation. Landed as |
…heck (#838) ### Scope The required Linux test job runs serially and blocks each landing for roughly half an hour. This change runs native unittest discovery as eight module shards and keeps one final required check named `validate`, which fails on any unsuccessful dependency or incomplete module coverage. - Base commit: `b16cb8cf7cb8e37bf0d0edb9924502beb3e6a276`. - Lane: `lane:shared`; the command center requests trading acknowledgement for the one promotion workflow-contract method. - Owned paths: validate workflow, shard helper/weights, its fixtures, declared workflow-contract tests, the decision/receipt and the final registry commit. - Landing path: exact-head co-op cross-family read after the draft's hosted timing run; command-center ACK; 5f lands after #833/#836 and before #820/#829/#776, per GO-RELAUNCH230713Z and RULING203309Z. The draft stays draft until that read. Critical-path cap allowance confirmed by item191739Z; all25kind3rows accepted by name in203309Z subject to their stronger-assertion condition. - #706 relation: this final summary supersedes G-6 (serial suite counts); G-1 (PR-metadata workflow work) stays in #706 for its rank38 turn. ## SOTA sources - [GitHub matrix strategies and failure handling](https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/run-job-variations), read 2026-10-07. - [GitHub needs result](https://docs.github.com/en/actions/reference/workflows-and-actions/contexts#needs-context) and [always](https://docs.github.com/en/actions/reference/workflows-and-actions/expressions#always), read 2026-10-07. - [Skipped jobs](https://docs.github.com/en/actions/how-tos/write-workflows/choose-when-workflows-run/control-jobs-with-conditions) report success even when required; [required status checks](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches#require-status-checks-before-merging) accept skipped statuses. This final job always runs and explicitly rejects skipped/cancelled/failed dependencies. - [CPython v3.12.3 native discovery](https://github.com/python/cpython/blob/v3.12.3/Lib/unittest/loader.py#L109), [load_tests protocol](https://docs.python.org/3.12/library/unittest.html#load-tests-protocol) and [TextTestRunner](https://docs.python.org/3.12/library/unittest.html#unittest.TextTestRunner). The helper supplies assignment and receipt glue; unittest runs the tests. - `native-agent-stack@b16cb8c:.github/workflows/validate.yml:147-250`: the unchanged provisioners and diagnostics. - Same pin, `docs/decisions/2026-10-03-suite-parallelism-trial-outcome.md:24-27`: the superseded Linux serial instruction; failed pool-trial evidence and macOS instruction preserved. - Existing pinned download/upload artifact actions are reused; no requirement file or other workflow job changes. ### Evidence-class table | Claim | Evidence class | Command / receipt | | --- | --- | --- | | Historical timing weights | source_review of retained native output | run37653671981/job112905135751, log SHA b1d2d43e; 17 failures retained | | Native discovery and assignment | local_integration | Current tree discovery-only sample:272owners/11607cases, no bodies; predates final fixture set | | Focused contracts and fixtures | local_integration; synthetic fixtures remain synthetic | 368tests/95.067s with one retained serial-binding failure; its authorized class delta3tests/0.874s passes; final new-module13tests/3.383s passes | | Syntax/integrity | local_integration | actionlint0; offlinezizmor0/findings[]; py_compile0; diff--check0; validate.py0 | | Hosted timing and exact module/count union | pending | The draft's actual run supplies this; historical estimates are not acceptance | Expected first-run limitation: this branch is still based on b16cb8c, while main28327acc carries #837's new frozen-lock exceptions. The first osv-scanner check is expected red for that base; it is refreshed only at the command-center landing cue's single rebase. No exception or requirement change is added here, and a local check never substitutes for the landing head's hosted result. ### Local commands run ```text nice -n 19 ionice -c3 actionlint -color .github/workflows/validate.yml exit0 nice -n 19 ionice -c3 zizmor --offline --no-config --no-ignores --format json .github/workflows/validate.yml exit0, [] python3 -I -B -X pycache_prefix=<ignored-owned-path> -m py_compile <helper and five touched test modules> exit0 nice -n 19 ionice -c3 <activated Python3.12.3> -I -B -X faulthandler <stdlib unittest bootstrap> -q --durations 50 selected: test_validate_shards, test_workflow_hardening, test_shell_parser_ci, test_landscape_sweep_skills, test_workflow_security_coverage, test_promotion_gate, test_adoption_docs_consistency exit1, 368ran/95.067s/onefailure/fiveskips (retained) Only failure: the promotion class's serial-command binding. Authorized delta: that class exit0, 3ran/0.874s; other36method ASTs and surrounding bytes preserved. New fixture deltas:12ran/3.407s and13ran/3.383s, both exit0. No full-suite phase or hidden baseline waiver. nice -n 19 ionice -c3 <activated Python3.12.3> -I -B scripts/validate.py exit0, components69/hashed_files10559/profiles4/receipts226. git diff --check exit0 ``` The local environment has Python3.12.3/PyYAML6.0.3 and real Node24.21.0/npm11.19.0 bins before generic PATH. It is a focused environment, not full hosted-image parity. Every hosted cell keeps the current installer and promotion/parser/NodeYAML provisioners; non-test checks execute once in cell zero. ### Contract changes Each listed existing test deliberately replaces the serial whole-suite binding with complete module-shard coverage under `docs/decisions/2026-10-07-validate-module-shards.md` (kind3). Provisioning, history, timeout/faulthandler and native failure controls remain. The one promotion method additionally runs the tiny native aggregate fixture; neighboring and numeric assertions remain byte-identical. The trading lane's conditional acknowledgement, ledger row `report-native-agent-stack-5f-20261007T200005-shardack`, binds that promotion method to three conditions: 1. Every shard runs the promotion provisioner with `--require-hashes` on `blueprints/us-equities/data/requirements.lock` and exports `REQUIRE_PROMOTION_GATE_VENV=1` before testing, including the shard assigned this module. 2. Module coverage comes from live native discovery, with each module's executed suite exactly once. Weights are scheduling estimates, not a separate test inventory. 3. Final `validate` runs under `if: always()` and passes only on successful shards; cancellation, skipping and timeout fail the gate. The trading lane checks these again on this PR before merge. | Test ID | Kind | Record | | --- | --- | --- | | `tests.test_workflow_hardening.WholeSuiteJobsCheckOutFullHistory.test_whole_suite_jobs_set_fetch_depth_zero` | 3 | docs/decisions/2026-10-07-validate-module-shards.md | | `tests.test_workflow_hardening.WholeSuiteHeadroomAndDiagnostics.test_every_whole_suite_job_names_its_suite_step` | 3 | docs/decisions/2026-10-07-validate-module-shards.md | | `tests.test_workflow_hardening.WholeSuiteHeadroomAndDiagnostics.test_each_suite_lists_its_50_slowest_tests_with_faulthandler_on` | 3 | docs/decisions/2026-10-07-validate-module-shards.md | | `tests.test_workflow_hardening.WholeSuiteHeadroomAndDiagnostics.test_linux_suites_abort_five_minutes_before_the_job_limit` | 3 | docs/decisions/2026-10-07-validate-module-shards.md | | `tests.test_workflow_hardening.WholeSuiteHeadroomAndDiagnostics.test_validate_uploads_its_verbose_log_even_when_the_suite_fails` | 3 | docs/decisions/2026-10-07-validate-module-shards.md | | `tests.test_workflow_hardening.ValidateSuiteStepTracesAHang.test_a_hang_prints_the_hung_test_traceback_and_fails_the_step` | 3 | docs/decisions/2026-10-07-validate-module-shards.md | | `tests.test_workflow_hardening.ValidateSuiteStepTracesAHang.test_control_without_faulthandler_the_hang_leaves_no_traceback` | 3 | docs/decisions/2026-10-07-validate-module-shards.md | | `tests.test_shell_parser_ci.ProvisioningStepTests.test_provisioning_step_exists_in_the_validate_job` | 3 | docs/decisions/2026-10-07-validate-module-shards.md | | `tests.test_shell_parser_ci.ProvisioningStepTests.test_provisioning_step_precedes_the_unittest_step` | 3 | docs/decisions/2026-10-07-validate-module-shards.md | | `tests.test_shell_parser_ci.ProvisioningStepTests.test_step_command_is_derived_from_the_pin_file` | 3 | docs/decisions/2026-10-07-validate-module-shards.md | | `tests.test_shell_parser_ci.ProvisioningStepTests.test_step_exports_the_directory_through_github_env` | 3 | docs/decisions/2026-10-07-validate-module-shards.md | | `tests.test_shell_parser_ci.ProvisioningStepTests.test_step_cannot_be_skipped_or_ignored` | 3 | docs/decisions/2026-10-07-validate-module-shards.md | | `tests.test_shell_parser_ci.ProvisioningStepTests.test_the_provisioning_job_is_the_job_that_runs_the_suite` | 3 | docs/decisions/2026-10-07-validate-module-shards.md | | `tests.test_shell_parser_ci.ProvisioningStepTests.test_every_whole_suite_job_provisions_the_parser_or_is_a_recorded_gap` | 3 | docs/decisions/2026-10-07-validate-module-shards.md | | `tests.test_shell_parser_ci.ProvisioningControls.test_each_mutant_is_reported_in_its_category` | 3 | docs/decisions/2026-10-07-validate-module-shards.md | | `tests.test_shell_parser_ci.ProvisioningControls.test_a_scratch_copy_of_the_workflow_without_the_step_fails_the_structure_tests` | 3 | docs/decisions/2026-10-07-validate-module-shards.md | | `tests.test_shell_parser_ci.RealRatchetControls.test_the_real_workflows_pass` | 3 | docs/decisions/2026-10-07-validate-module-shards.md | | `tests.test_shell_parser_ci.RealRatchetControls.test_a_new_whole_suite_job_in_a_real_workflow_is_reported` | 3 | docs/decisions/2026-10-07-validate-module-shards.md | | `tests.test_shell_parser_ci.RealRatchetControls.test_provisioning_a_recorded_gap_job_is_cleared_by_deleting_its_entry` | 3 | docs/decisions/2026-10-07-validate-module-shards.md | | `tests.test_shell_parser_ci.RealRatchetControls.test_a_step_that_only_names_the_pin_file_is_judged_by_the_structure_checks` | 3 | docs/decisions/2026-10-07-validate-module-shards.md | | `tests.test_landscape_sweep_skills.SkillsYamlProvisioningTests.test_the_validate_job_provisions_the_yaml_pin_before_the_suite` | 3 | docs/decisions/2026-10-07-validate-module-shards.md | | `tests.test_landscape_sweep_skills.SkillsYamlProvisioningTests.test_every_whole_suite_job_provisions_the_yaml_pin_or_is_a_recorded_gap` | 3 | docs/decisions/2026-10-07-validate-module-shards.md | | `tests.test_landscape_sweep_skills.SkillsYamlProvisioningControls.test_each_mutant_is_reported_in_its_category` | 3 | docs/decisions/2026-10-07-validate-module-shards.md | | `tests.test_landscape_sweep_skills.SkillsYamlProvisioningControls.test_the_ratchet_reports_a_new_whole_suite_job_and_a_gap_that_now_provisions` | 3 | docs/decisions/2026-10-07-validate-module-shards.md | | `tests.test_promotion_gate.WorkflowProvisioningContract.test_unittest_step_runs_the_full_suite` | 3 | docs/decisions/2026-10-07-validate-module-shards.md | ### Failed attempts and limits The failed unittest-parallel trial remains unchanged. The historical weighting run failed17 tests. Worker fixture-authoring attempts (one missing-helper error; then one failure/one error among12cases) remain disclosed separately; later root runs do not replace them. An early validate returned1 for pending registry hashes, and an incorrect register_file CLI probe returned2 before the documented Python API was used. The source critic's two fixture gaps (global zero discovery and a package hook invoking nested discovery) are covered by the passing native delta fixtures. Shared fixture origins trigger an explicit serial fallback; that preserves native semantics and must be reported as a performance constraint. Actual hosted latency, skips and complete module coverage remain pending. ### Decision record `docs/decisions/2026-10-07-validate-module-shards.md`; scoped observations in `evidence/artifacts/validate-module-shards-20261007/preparation.json`. The final commit changes only `manifests/evidence.json`. ### Host evidence No host receipt, platform-status change, install or setting change. ### Checklist - [x] Changed actions pinned to full SHAs with version comments. - [x] Top-level permissions empty; each job grants contents:read only. - [x] No credential value or new secret. - [x] No new billing surface. - [x] Peer worktrees preserved. - [ ] Trading acknowledgement before merge (command center requests it). - [ ] Hosted timing/coverage receipt and exact-head cross-family read.
Scope
AGENTS.mdfrom 10,959 to 7,499 bytes; Claude's startup scope from 23,896 to 19,885 bytes and Codex's from 20,101 to 15,983), keeping every remaining rule sentence's wording, and moves the trading trigger out of the root file into a path-scoped rule that loads only for trading paths (.claude/rules/trading.md) and the existing subtree pointer.475127d43c1cce70dba5cd31238af4e078fa17eblane:shared(rootAGENTS.mdis a shared hot file indocs/lanes.md; the trading lane's acknowledgement is asked before merge)AGENTS.md;examples/claude-native/CLAUDE.md;adoption/templates/codex.AGENTS.template.md; new.claude/rules/trading.md; the two regenerated carriersadoption/new-wsl/{claude,codex}-user-instructions.md;adoption/scaffold/AGENTS.md;examples/claude-native/workflows/README.md;tests/fixtures/harness-context-moves/(12.txt, 13.txt, contracts.json, README.md);tests/test_install_claude_profile.py;tests/test_codex_worker_lane.py; newdocs/decisions/2026-10-07-instruction-core.mdand dated addenda in three earlier records;manifests/evidence.json(registry, last). RootCLAUDE.mdis byte-identical; nothing undercatalogs/orblueprints/changes.SOTA sources
.claude/rules/withpaths:load only when Claude works with matching files; nested files load on demand.Evidence-class table
startup_files()tests.test_install_claude_profile.PortableTopRuleTestsmeasurement at this headtools/adoption/new_wsl_client_config.py --write-blocks;tests.test_new_wsl_client_configLocal commands run
Decision record
docs/decisions/2026-10-07-instruction-core.md: the change, what each moved block's new home is, the alternatives (a new harness kit repository, which the owner approved separately for later; leaving the files as they are), and what would overturn it.Contract changes
contract-changes=
tests.test_install_claude_profile.StandingRuleSurfacesTests.test_the_three_surfaces_carry_the_same_standing_sentences(kind 4: the surface list loses rootAGENTS.md; kind 3: the first standing sentence loses its vendor example) ·tests.test_install_claude_profile.PortableTopRuleTests.test_each_relocated_passage_is_byte_bound_to_its_destination_section(kind 4: relocation contract 01 retired with its heading; 01.txt kept as history; two new contracts 12 and 13 added) ·tests.test_codex_worker_lane.TemplateTests.test_top_rule_is_pinned_and_rendered_rtk_is_the_unchanged_pinned_source(kind 3: both pins recomputed) ·tests.test_install_claude_profile.PortableTopRuleTests.STARTUP_BUDGET_BYTES(tightened: 24,458 and 20,103 to 20,880 and 16,783). Each is named in the decision record with what it supersedes; the command center rules the kind 4 rows by name.Host evidence
Not applicable: nothing under
evidence/hosts/changes.Checklist
permissions: {}: not applicable, no workflow changes.🤖 Generated with Claude Code