Skip to content

Launch Trade sessions in native client worktrees - #935

Draft
seathatflowsinourveins wants to merge 4 commits into
mainfrom
codex/ns2604-trade-profiles-20261009
Draft

seathatflowsinourveins wants to merge 4 commits into
mainfrom
codex/ns2604-trade-profiles-20261009

Conversation

@seathatflowsinourveins

@seathatflowsinourveins seathatflowsinourveins commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Scope

Add Trade - Claude and Trade - Codex profiles that start from the trading main checkout and request each client's native worktree session. When tracked/staged files are clean, the profile attempts fetch/fast-forward; dirty state or refresh failure prints one line and still starts the client. Harmless untracked auxiliary files such as .serena/ allow refresh; Git preserves a conflicting untracked file and takes the same fallback. Runtime synchronization happens through uv run --locked on first project use. The original five generic profiles and resume pickers retain their behavior.

  • Fork base: aeb6ea585e7ee1db6150314229a45070edf9da4c.
  • Current head: cff7e62461fcaa01df4feba3638a3ce9b1e1e254. Two separately authorized fix commits: native-worktree rework ed714f0 directly on 54c0c9f, then the cheap P3 cff7e62 directly on ed714f0. Exactly one commit per authorization; no rebase.
  • Lane: lane:foundation.
  • Five owned paths: existing WT fragment, its test module, profile recipe, dated decision, and their existing source registrations in manifests/evidence.json.
  • T8's table explicitly places this slice in native-agent-stack; this native PR remains a draft. Host fragment application and real launches belong to the CC.

SOTA sources

Evidence-class table

Claim Evidence class Receipt
Both native worktree flags exist at selected installed versions source_review Installed version/help, Claude TTY help and pinned release/source
Main refresh only runs when clean and fast-forwards to fetched main local_integration / synthetic Real local Git fixture, exact shipped Bash command, inert client probe
Dirty tracked/staged state, failed fetch and divergence still reach the client local_integration / synthetic Real Git fixtures assert preserved bytes/index and exactly one fallback line
Harmless untracked files/directories allow refresh; collisions preserve bytes and the old HEAD local_integration / synthetic Exact shipped command against real Git with inert clients; --untracked-files=no and native merge collision handling
Client receives native flag, correct main cwd, no fixed lane tag and no inherited Claude auth marker synthetic Explicit non-secret fixture environment and inert client argv/presence probes; no values logged
Original five generic profiles are preserved source_review / local_integration Exact profile-object comparison and retained generic tests/negative controls
Registry integrity passes local_integration Full publication validator:70components/11278hashes/239receipts/4profiles, rc0
Native trust, managed checkout creation, first runtime sync and skills/MCP work in Windows Terminal Pending host acceptance CC applies the fragment and performs one-time main trust and real first launches after landing

Local commands run

python3 -m unittest discover -s tests -p test_windows_terminal_defaults.py -v
rc0;52tests,allpassed,noskips,6.613s
systemd-run --user --scope --quiet -p MemoryMax=768M -p CPUQuota=150% python3 scripts/validate.py
rc0;70components,11278hashedfiles,239receipts,4profiles
git diff --check
rc0
base_tests_at_head.sh <T8 tree> ed714f086822fea2d189dc9647430cee968332c9 cff7e62461fcaa01df4feba3638a3ce9b1e1e254
rc1;51old-headtests,2declaredexpectationfailurerows,1changedmodule
base_tests_at_head.sh <T8 tree> aeb6ea585e7ee1db6150314229a45070edf9da4c cff7e62461fcaa01df4feba3638a3ce9b1e1e254
rc1;45original-basetests,5declaredexpectationfailures,1changedmodule
Earlier native-fix-only receipt, scoped to ed714f0:
base_tests_at_head.sh <T8 tree> 54c0c9fdd29674e035cc79c9e0d464628ecc601b ed714f086822fea2d189dc9647430cee968332c9
rc1;48old-headtests,12declaredexpectationfailurerows,1changedmodule

Both final-head pre-cue runs used capped 768 MiB/150% CPU systemd scopes. The target tests use real Git and inert clients only. No actual Claude/Codex/Agent SDK session, authenticated model request, live-host edit, runtime install, MCP call or market-data pull is performed.

Test changes and pre-cue declaration

tests_changed=1: tests/test_windows_terminal_defaults.py remains the sole changed test module. Trade cases verify clean refresh, tracked/staged dirtiness, harmless and conflicting untracked state, fetch failure and non-fast-forward divergence from the main checkout. They assert native --worktree, no Worktrunk/uv/pre-generated-branch command, no %, no hcom lane tag, correct ultra/priority argv, and synthetic Claude auth-marker removal. The five generic profiles/default/picker checks remain exact.

The ed714f0→cff7e62 P3 replay's two rows are explicitly declared: test_untracked_main_skips_refresh_and_still_launches, one subtest per Trade profile. The old tests required harmless untracked files to block refresh. The final tests instead require refresh with harmless untracked files/directories and separately verify that Git preserves a colliding untracked file and the old HEAD while continuing to the client. All 52 final tests pass.

The earlier 54c0c9f→ed714f0 native-fix replay's 12 rows, scoped to that earlier head, remain declared: three old fragment/Trade-command assertions, two profile subtests of test_failed_fetch_stops_before_creating_a_worktree_or_syncing, two profile subtests of test_failed_runtime_sync_stops_before_either_client_starts, and five rows under test_repeated_trade_tabs_get_distinct_fetched_main_worktrees_and_sync_before_the_client. Those old tests enforce the superseded external-worktree/pre-launch-sync/fail-before-client design. This receipt establishes the native rework's tested boundary at ed714f0; it is not a final-head replay.

The aeb6ea→cff7e62 final full-PR replay's five failures are the declared original five-profile/three-placeholder/two-Claude-environment expectations: test_a_defect_in_the_profile_set_is_detected, test_a_fragment_of_five_profiles_that_declare_no_guid, test_only_claude_sets_truecolor_and_only_through_the_environment_key, test_only_the_three_placeholders_stand_for_host_values, and test_the_whole_example_passes_every_fragment_check. Two Trade profiles and their separate project placeholder are intended additions. Neither final-head replay reached the 60-row cap; the tool's 200-character row display abbreviates some subtest labels. These nonzero outcomes are not passing base replays or waived reviews. Private receipts preserve the earlier aeb6ea→ed714f0 run separately.

Decision record

docs/decisions/2026-10-09-trade-launch-profiles.md records the final native-client interface, exact selected-version help/changelog references, tracked/staged clean-main fallback, untracked collision handling, matching interactive ultra default, lazy runtime sync and native lifecycle. It distinguishes Claude /exit removal from Codex managed retention/recovery. No new wrapper or cleanup script is shipped.

Host evidence

The CC's reported facts are recorded: tools are on the login PATH, UET main has its project/lock and dev/lint/validation groups, and no .config/wt.toml exists there. The CC applies the fragment after landing, confirms main trust once, and records actual profile/worktree/runtime/skills/MCP operation plus the first uv run sync time. Local inert-client proof does not substitute for that acceptance. UET frozen CI/protocol and protected paper/data work remain untouched.

Checklist

  • One native fix on 54c0c9f, then one separately authorized cheap P3 on ed714f0; no rebase; five owned paths only.
  • Native client worktrees replace the external wrapper/branches/pre-sync; cleanup is native with no script.
  • Current behavior is cited at selected installed versions/full-SHA release/source pins.
  • 52 final tests/full publication validation/diff pass; both final-head nonzero base replays and the earlier native-fix receipt are declared.
  • No source credentials, new security mechanism, holdout-data operation or actual client session.
  • Updated-head CC read/applicable hana ack, required CI, zero threads and explicit CC landing cue complete.
  • CC host apply/inverse, one-time trust and actual first-launch acceptance complete.

seathatflowsinourveins and others added 2 commits October 9, 2026 13:03
Add separate Trade Claude and Codex entries to the Windows Terminal fragment through native Worktrunk execution. Keep the five generic defaults unchanged and cover fresh fetched-main branches, sync-before-client arguments and failure exits with inert-client integration tests.

Co-Authored-By: Codex <[email protected]>
@seathatflowsinourveins seathatflowsinourveins added the lane:foundation Foundation lane: Claude/Codex setup, hosts, memory, RAG, research, workers label Oct 9, 2026
Start from trading main, attempt refresh only when clean, and continue to the native worktree session after refresh failure. Match the interactive ultra effort template, remove pre-launch sync and external cleanup, and bind the documented interfaces to the installed client versions.

Co-Authored-By: Codex <[email protected]>
@seathatflowsinourveins seathatflowsinourveins changed the title Add Trade terminal profiles with fresh locked-runtime worktrees Launch Trade sessions in native client worktrees Oct 9, 2026
Ignore untracked auxiliary state in the tracked/staged clean check. Preserve native ff-only collision handling and client launch fallback, with real Git tests for harmless and conflicting untracked files.

Co-Authored-By: Codex <[email protected]>
seathatflowsinourveins added a commit that referenced this pull request Oct 9, 2026
…reads

CC P2-1: ordinary unapproved inventory discoveries are names-only records,
with no target stat/resolve/open/hash or fabricated asset presence. Cache
signatures track names, while canonical content reads retain exact approval.
Known aliases bind an independently approved canonical target. Optional
Architecture failures retain the last page or explicit UNREPORTED placeholder
and allow the other six pages to refresh.

CC P2-2: Adoption attribution metadata uses the maintained protected-name,
bounded no-follow descriptor reader and guarded directory enumeration. Raw
co-op registry/parking/capacity payloads are never read during derivation;
unsafe/missing metadata remains UNREPORTED with no fabricated attribution.

P3: add reproducible names-only user grant/alias observations and a CI
repo-grant parity test against git ls-files, replace vacuous selector test,
fix root-dependent mapping provenance and documentation spacing/semantics.
Host-label masking remains the CC's separate repository-wide decision.

Preserve both GPT P2 corrections: frozen receipt eligibility exclusion and
exact source/evidence/inventory readers. Meaningful red/green regressions
cover unlisted stat/open traps, composer degradation, alias retargeting,
Adoption parent/leaf redirects, source limits and measured counters.

ONE authorized commit on 6480927, no rebase.
Landing-head grants and full host build/privacy receipt are owed only after
the authorized rebase, following #926, #935 and #915. CC owns Claude reads.
Source CC read SHA256 dfd30c957ffc8c87fd2283b87dfa4ca097917492ccce69e00e79216609e37c6c.
Native reference: CPython3.13.16 cbc944f4bc59639a444dd971c737788ba2283a91,
existing source_policy descriptor reader and native Git filename metadata.
seathatflowsinourveins added a commit that referenced this pull request Oct 9, 2026
…reads

CC P2-1: ordinary unapproved inventory discoveries are names-only records,
with no target stat/resolve/open/hash or fabricated asset presence. Cache
signatures track names, while canonical content reads retain exact approval.
Known aliases bind an independently approved canonical target. Optional
Architecture failures retain the last page or explicit UNREPORTED placeholder
and allow the other six pages to refresh.

CC P2-2: Adoption attribution metadata uses the maintained protected-name,
bounded no-follow descriptor reader and guarded directory enumeration. Raw
co-op registry/parking/capacity payloads are never read during derivation;
unsafe/missing metadata remains UNREPORTED with no fabricated attribution.

P3: add reproducible names-only user grant/alias observations and a CI
repo-grant parity test against git ls-files, replace vacuous selector test,
fix root-dependent mapping provenance and documentation spacing/semantics.
Host-label masking remains the CC's separate repository-wide decision.

Preserve both GPT P2 corrections: frozen receipt eligibility exclusion and
exact source/evidence/inventory readers. Meaningful red/green regressions
cover unlisted stat/open traps, composer degradation, alias retargeting,
Adoption parent/leaf redirects, source limits and measured counters.

ONE authorized commit on 6480927, no rebase.
Landing-head grants and full host build/privacy receipt are owed only after
the authorized rebase, following #926, #935 and #915. CC owns Claude reads.
Source CC read SHA256 dfd30c957ffc8c87fd2283b87dfa4ca097917492ccce69e00e79216609e37c6c.
Native reference: CPython3.13.16 cbc944f4bc59639a444dd971c737788ba2283a91,
existing source_policy descriptor reader and native Git filename metadata.
seathatflowsinourveins added a commit that referenced this pull request Oct 9, 2026
…reads

CC P2-1: ordinary unapproved inventory discoveries are names-only records,
with no target stat/resolve/open/hash or fabricated asset presence. Cache
signatures track names, while canonical content reads retain exact approval.
Known aliases bind an independently approved canonical target. Optional
Architecture failures retain the last page or explicit UNREPORTED placeholder
and allow the other six pages to refresh.

CC P2-2: Adoption attribution metadata uses the maintained protected-name,
bounded no-follow descriptor reader and guarded directory enumeration. Raw
co-op registry/parking/capacity payloads are never read during derivation;
unsafe/missing metadata remains UNREPORTED with no fabricated attribution.

P3: add reproducible names-only user grant/alias observations and a CI
repo-grant parity test against git ls-files, replace vacuous selector test,
fix root-dependent mapping provenance and documentation spacing/semantics.
Host-label masking remains the CC's separate repository-wide decision.

Preserve both GPT P2 corrections: frozen receipt eligibility exclusion and
exact source/evidence/inventory readers. Meaningful red/green regressions
cover unlisted stat/open traps, composer degradation, alias retargeting,
Adoption parent/leaf redirects, source limits and measured counters.

ONE authorized commit on 6480927, no rebase.
Landing-head grants and full host build/privacy receipt are owed only after
the authorized rebase, following #926, #935 and #915. CC owns Claude reads.
Source CC read SHA256 dfd30c957ffc8c87fd2283b87dfa4ca097917492ccce69e00e79216609e37c6c.
Native reference: CPython3.13.16 cbc944f4bc59639a444dd971c737788ba2283a91,
existing source_policy descriptor reader and native Git filename metadata.
seathatflowsinourveins added a commit that referenced this pull request Oct 10, 2026
…deferred detail (#913)

* Render source-built architecture and per-role adoption evidence

* fix(local-pages): restore receipt evidence and defer architecture tables

* fix(local-pages): confine architecture reads and declare inventory custody

* fix(local-pages): guard Architecture inventory and exclude frozen receipts

P2-1: remove two unused frozen input grants. Derive the eligible receipt
union from pinned registration metadata and the tripwire's own eligibility
declaration, excluding frozen/protected paths; 4650 becomes 4648. No artifact
body use, descriptive-pin waiver or runtime-discovered permission.

P2-2: pass the independent reader through the complete inventory build and
cache signature. Authorize exact canonical content inputs before opening or
hashing; protect both lexical and canonical aliases; parse/hash the same
captured bytes. Newly discovered unlisted sources stop publication/cache
reuse without changing the previous published page or receipt.

User agent and service configurations use separate exact metadata grants
and native descriptor-relative no-follow stat, never content hashes. Only
exact installed SKILL.md assets receive user content approval. Bounded
64KiB capture avoids allocating a logical large bound for a small payload.

Full-builder regressions reproduce both reported forbidden reads at ddb,
then verify zero forbidden opens and prior publication preservation; cached
discovery, aliases, unlisted metadata, late symlinks, growth budgets and
unknown hash comparisons are covered. Prior immutable Adoption/source and
evidence boundaries remain intact. No rebase; ONE authorized fix commit.

Reference GPT verdict SHA256
9c4ed3c41e4e678981b75a71a398df373d0c6798a3d6b5ddb5403f85a1f94e59;
native reader ddb7a2a and CPython3.13.16
cbc944f4bc59639a444dd971c737788ba2283a91 os/pathlib/io with native Git metadata.

* fix(local-pages): preserve page availability and guard Adoption role reads

CC P2-1: ordinary unapproved inventory discoveries are names-only records,
with no target stat/resolve/open/hash or fabricated asset presence. Cache
signatures track names, while canonical content reads retain exact approval.
Known aliases bind an independently approved canonical target. Optional
Architecture failures retain the last page or explicit UNREPORTED placeholder
and allow the other six pages to refresh.

CC P2-2: Adoption attribution metadata uses the maintained protected-name,
bounded no-follow descriptor reader and guarded directory enumeration. Raw
co-op registry/parking/capacity payloads are never read during derivation;
unsafe/missing metadata remains UNREPORTED with no fabricated attribution.

P3: add reproducible names-only user grant/alias observations and a CI
repo-grant parity test against git ls-files, replace vacuous selector test,
fix root-dependent mapping provenance and documentation spacing/semantics.
Host-label masking remains the CC's separate repository-wide decision.

Preserve both GPT P2 corrections: frozen receipt eligibility exclusion and
exact source/evidence/inventory readers. Meaningful red/green regressions
cover unlisted stat/open traps, composer degradation, alias retargeting,
Adoption parent/leaf redirects, source limits and measured counters.

ONE authorized commit on 6480927, no rebase.
Landing-head grants and full host build/privacy receipt are owed only after
the authorized rebase, following #926, #935 and #915. CC owns Claude reads.
Source CC read SHA256 dfd30c957ffc8c87fd2283b87dfa4ca097917492ccce69e00e79216609e37c6c.
Native reference: CPython3.13.16 cbc944f4bc59639a444dd971c737788ba2283a91,
existing source_policy descriptor reader and native Git filename metadata.

* fix(local-pages): align architecture grants and protect public inventory

* fix(local-pages): refresh Architecture landing provenance

* fix(local-pages): publish unapproved inventory as counts

---------

Co-authored-by: seathatflowsinourveins <[email protected]>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lane:foundation Foundation lane: Claude/Codex setup, hosts, memory, RAG, research, workers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant