Skip to content

Qualify native Claude/Codex token profile and memory lifecycle - #561

Closed
seathatflowsinourveins wants to merge 15 commits into
mainfrom
token-native-profile-completion-20260930
Closed

seathatflowsinourveins wants to merge 15 commits into
mainfrom
token-native-profile-completion-20260930

Conversation

@seathatflowsinourveins

@seathatflowsinourveins seathatflowsinourveins commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

Scope

Qualify the selected native token-efficiency profile on the source host, repair strict Serena parity and safe personal Workflow installation, and activate ai-memory 2.4.2 through its native lifecycle. Record useful calls in both client families, recoverable caller failures, and lifetime accounting without adding overlapping estimates.

  • Original qualification base: 8fc86119eacfd5be9b8a139e1ed167d85748091b; upstream main 4720b202f1d9795754bf59bb42892193eb87693f subsequently integrated, preserving its independent Codex qualification and session-notice work.
  • Lane: lane:foundation
  • Owned paths: native Claude profile installer and tests; native token fixture and tests; dated token evidence/decision/experiment; selected foundation adoption metadata and dashboard checkpoint. Existing unrelated working-tree edits are excluded.

SOTA sources

  • Claude Code official setup, installed native 2.1.285 and matching official download manifest; retained 2.1.284 compatibility floor. Experimental Workflow/Agent acceptance comes from actual native events, not inferred docs coverage.

  • OpenAI Codex rust-v0.159.2: native exec/app-server, JSONL cumulative usage, native hook writer and recursive upsert.

  • ai-memory v2.4.2: official archive/checksum, native hooks, identical V67 store/migration tree and supported deployment rollback. Preserve 2.4.1 source 433a19f3d54dea287571b1423591db2a89965fa9 for the isolated rollback comparison.

  • RTK v0.50.0: native command filtering, proxy recovery and upstream inline verification.

  • Context Mode v1.0.169: execute/retrieval and estimated counter formulas; installed plugin 6f0cc6841c687e754059f36714a11233fda1a02b and registry npm artifact remain separate identities.

  • Repomix v1.18.1, Headroom 0.37.0, TOON v4.1.1, ccusage v20.0.26: supported native CLI/MCP operations and exact returned fixture checks.

  • QMD v2.8.3, MarkItDown v0.1.8, Serena c6fbd1c, SocratiCode 1.15.0, MCPorter v0.14.1: scoped document/code/navigation/bridge operations, exact bodies, lifecycle cleanup and native integration formats.

  • Unchanged agent-lab workflows for readiness/review and layer-verdict-lane at its separate pin; native placement/idempotence follows the installed Claude workflow loader and retained source hashes in the lifecycle receipt.

  • Hindsight integration 0.8.0, unchanged src/installer.test.ts, and Hindsight research. Live backend acceptance remains deferred. Other dated memory/RAG pins are in memory-selection.json.

  • Existing repository reporter at the base above and gpt-tokenizer 4.0.0: native capture, append ledger and separately scoped exact comparisons; no new custom reporting system.

  • Serena ancestor detection and single-project exclusions: cli.py#L369-L383, agent.py#L839-L848. The cold fixture omits autodetection; complete byte equality and each one-field rejection remain enforced.

  • Existing repository discovery/rendering contracts at 11810a054546f50962270d93564afad36f3e0c60: scripts/validate_convergence.py#L203-L245, scripts/validate_catalogs.py, scripts/new_host_grand_list.py (maintained build/render functions). Register the existing canonical experiment and regenerate the derived host guide; no validator change.

  • Uses main's qualified security lock: LiteLLM GHSA-3cv6-jpf6-8222, fixed BerriAI/litellm v1.93.2 / cd1bd0f4, retaining OpenHands SDK 1.49.6 / fcc102a and its supported native uv lock/export flow. The lock is byte-identical to main's PR562 repair. Its canonical receipt is osv-openhands-litellm-relock-20260930.json; independent changed-wheel native proof remains in osv-litellm-1932-20260930.json. The two OAuthlib ignore IDs and expiry are unchanged.

Evidence-class table

Claim Evidence class Command / receipt
Fresh native clients, Ultracode Workflow/Agent recovery, Codex V2 child native_proven token-lifecycle-resolution-20260930.json; original caller failures retained
Clean selected sixteen-tool prefix local_integration, synthetic, with native commands 259 returned commands / 82 checks at ai-memory 2.4.1; 2.4.2 delta separately recorded
Useful tools in both clients native_proven, local_integration, synthetic Codex twelve fresh; Claude eight fresh plus four dated unchanged-pin positive operations; historical missing controls stay partial
Active ai-memory 2.4.2 and persisted Codex hook approval native_proven, source_review Verified active executable, native hook installers, native upsert and new-process seven trusted hashes; six other hooks unchanged
Memory restart and binary rollback local_integration, synthetic Exact isolated V67 body across 2.4.1 → 2.4.2 → 2.4.1; no production database/authentication copy
Hindsight installer tests native_proven (unchanged upstream tests) 203 passed / two upstream sqlite3-dependent skips; not live backend acceptance
Lifetime report native_proven, with estimated counters Installed service exit 0 / timer active; separate retained/window/event estimates and exact artifact comparisons; no aggregate provider saving

| Fresh current-pin Linux E2E | native_proven / local_integration / synthetic | Run 36792680424: 259 native commands and 82 checks passed on f03fb80. Owned temporary state removed. Earlier exact complete receipt is retained publicly and its 17 tested source inputs match. |
| Linux and macOS bootstrap | native_proven / local_integration | Run 36792680414: Linux and both macOS bootstrap jobs passed on f03fb80. Separate macOS validation passed 489 tests with 29 skips. Other hosts still require their own client and useful-operation qualification. |
| Registry and repository validation | local_integration / source_review | All 26 declared records / 142 observations pass locally. Linux run 36792737973 passed 8816 tests with 806 skips on f03fb80; macOS passed 489 tests with 29 skips separately. Main evidence reconciliation passed 38 security-policy and 3 lock-binding tests locally. The concurrent routing/rule merge passed 219 profile/routing/Claude installer tests with 3 skips after retaining the native 160-character label guard. Original failed CI and corrected 185 targeted tests are retained. Current revision checks cover the latest revision. No provider/GPU qualification inferred. |

Local commands run

python3 -m unittest discover -s tests -p test_install_claude_profile.py
exit 0: 77 tests, three preexisting skips
python3 -m unittest discover -s tests -p test_native_token_ci.py
exit 0: 48 tests
python3 scripts/adoption_status.py --profile token-efficiency --client-wiring --pinned-versions --json
exit 0: wiring complete, seven trusted Codex memory hooks, twelve exec pins match; two package probes intentionally unchecked and separately qualified
python3 scripts/validate_convergence.py blueprints/convergence-practice/token-lifecycle-resolution-20260930/experiment.json --json
exit 0: 26 declared observations; consistency only
python3 scripts/validate.py
exit 0: publication integrity and scope checks
systemctl --user start token-report-refresh.service
exit 0: installed canonical reporter, zero issues, timer active

RTK prefixes were used; exact outputs used rtk proxy. Original failed attempts and unknown caller usage remain in artifacts. Independent Astra/max verification confirmed native service/binary, all 24 client/tool evidence hashes, seven native hook approvals, privacy scan and counter boundaries. Native/provider execution, authored fixture checks and source review are kept distinct.

Decision record

docs/decisions/2026-09-30-token-profile-completion.md and docs/decisions/2026-09-30-token-lifecycle-resolution.md.

The profile retains main’s selection/routing acceptance and its dated native source-host qualification as separate claims; both decision links are in the recipe. jCodeMunch, codebase-memory and ast-grep remain optional carrier tools. This is dated source-host acceptance. Other hosts need their own native sign-ins and useful operations. No fresh twelve-tool Claude provider run, matched provider-saving winner, live Hindsight backend acceptance, production forced PreCompact trial or exact lifetime dollars saved is asserted. Native source selections can be replaced after a decision-changing matched comparison. Original failed CI returns, the inherited-project correction, and publication-format rejection remain recorded in ci-repair.json; the full unchanged UTF-8 native receipt is retained in native-ci-1ac1f7d2/receipt.json.

Host evidence

No files under evidence/hosts/ and no platform-status change.

Checklist

  • No GitHub Actions changes.
  • No credentials or native authentication stores copied or published.
  • Original source/hash preimages retained instead of changing historical evidence.
  • Source-host qualification and destination-host acceptance remain separate.

@seathatflowsinourveins seathatflowsinourveins added the lane:foundation Foundation lane: Claude/Codex setup, hosts, memory, RAG, research, workers label Sep 30, 2026
@seathatflowsinourveins

Copy link
Copy Markdown
Owner Author

Custody plan for #561 (Claude session native-agent-stack-0c). Nothing has been edited, closed or pushed yet.

Live re-read, 2026-10-03 ~07:34Z.

Plan: port and close. A fresh lane:foundation PR from current main ports four parts that are still valid and missing from main:

  1. The apply_claude_settings hook-ownership split. ai-memory v2.5.2's install_hooks.rs still drops a whole entry when any hook inside it is ai-memory's.
  2. The Serena explicit no-project fixture fix, with its four retained preimage files.
  3. The saved-workflow installer, as an opt-in --only workflows step. Bootstrap defaults stay unchanged.
  4. The 19 anti-pattern rows.

A dated retirement record on main will keep the 09-30 source-host facts and limits, linked to this head.

Not ported:

  • The ai-memory 2.4.2 pin moves. They are superseded by 2.5.2 in the new-WSL profile and in the two-host memory-owner decision; main's 2.4.1 lock stays.
  • The Claude 2.1.285 recipe text.
  • The catalog and dashboard regenerations.
  • The experiment record and the receipts.

#561 closes after the port merges, citing it. This branch and its head stay.

wsl-architecture-design: the merge change reaches new_wsl_client_config.py through merge_settings. Your tests must pass unchanged as a gate, and you'll get a heads-up when the port PR opens.

Objection window: 2 hours from this comment.

— Claude session native-agent-stack-0c

@seathatflowsinourveins

Copy link
Copy Markdown
Owner Author

Closed unmerged: superseded by its port #679, merged as 33efbc3b6a46df556bdedf39cd8ea65762f38867, which carries this PR's change rebuilt on current main. This PR's head and branch are preserved; recovery: git fetch origin pull/561/head.

@seathatflowsinourveins
seathatflowsinourveins deleted the token-native-profile-completion-20260930 branch October 8, 2026 08:00
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