Repository navigation
Read host identity variables from host.py, and the event log through event_log in scripts - #1289
Merged
Merged
Conversation
# Conflicts: # scripts/site.py
leaf-agent
approved these changes
Sep 27, 2026
max-sixty
added a commit
that referenced
this pull request
Sep 27, 2026
…he remaining tests, and locate margin controls by kind (#1295) #1276, #1285 and #1289 moved the suite onto the product's own readings; #1288's parallel thread work re-introduced two of the copies they had removed, and `test_render_controls.py`, `test_render_threads.py` and `test_render_application_boundary.py` still carried a few more. **Runtime modules.** Two sites in `test_render_threads.py` still resolved `/runtime/…` from the page's `<script data-lf-entry>` inline, instead of the harness's `window.__lfRuntimeImport`. Both now go through it, the way #1276 moved every other page-side import. **Interaction log.** Four sites in `test_render_application_boundary.py` still split `interactions.jsonl` with `read_text().splitlines()`, which also splits on a U+2028 inside a recorded value. They now read it through `interaction_log.lines`, the product's own reader, already used the same way for `events.jsonl` via `event_log.read_events`. **Margin controls by kind.** `render_harness.py` had `margin_control`, `draft_control` and `suggestion_control` for one exact id, but four sites in `test_render_controls.py` and one in `test_render_threads.py` still spelled `[data-lf-margin-entry-owner^="suggestion:"]` or `^="draft:"` inline, to find any instance of a kind rather than a particular one. `any_owner_entry`, `any_draft_control` and `any_suggestion_control` cover that case, and every site now uses them. A sixth site read a suggestion's id back out of its margin entry by slicing the `"suggestion:"` prefix off the owner attribute in browser JS; it now asks `marginEntrySource`, the runtime's own link from a margin control to the widget that registered it, for the widget's element directly. The `tests-readings` TODO item is done. Checked by running each touched test and the whole `test_every_ring_the_layer_draws_is_shown_whole_somewhere_in_the_corpus`, which exercises the `any_owner_entry` table entry, the draft locator, and the `marginEntrySource` lookup together, plus `npm run test:runtime`. > _This was written by Claude Code on behalf of max-sixty_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Sonnet 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which environment variables make a process a host session is now stated once, in
host.py, and the three places that kept their own list read it instead.host.pyalready listed each harness'ssession_variables. Each harness now also declaresidentity_variables: its session variables plus the ones itslifetimereads, which for Claude Code areCLAUDE_PIDandCLAUDE_JOB_DIR.IDENTITY_VARIABLEScollects every harness's set andLEAF_AGENT, now namedAGENT_VARIABLE, the display name any harness takes. It replacesSESSION_VARIABLES, whose only readers were the scrubbers below.tests/conftest.pybuildssessionlessandisolated_sessionfromIDENTITY_VARIABLES, andCLAUDE_IDENTITYfromClaudeCodeHarness.identity_variables.CODEX_IDENTITYis gone, since its two remaining uses meant the whole set. A new host variable now reaches the suite's isolation without a second edit.scripts/site.pyalso scrubsCLAUDE_PID,CLAUDE_JOB_DIRandLEAF_AGENTfrom the build's environment, so the builder's display name can no longer sign a published version note.scripts/eval_harness.pyalso scrubsLEAF_AGENT, so an eval child no longer speaks as its launcher's named worker. ItsCLAUDE*prefix rule stays: it covers settings, such as the effort level, that no host reads.This also finishes the event-log half of #1276, which waited on #1265 because both touch the same scripts.
scripts/record-demo.pyandscripts/eval_claude_delivery.pynow readevents.jsonlthroughevent_log.read_eventsrather thansplitlines(), which splits a comment at U+2028, and so does one more test that read the file raw (test_each_carrier_hands_the_agent_what_the_snapshot_shows). Two raw reads stay where the file's bytes are the subject: a snapshot of the stored line, and a check thatseqis never stored.TODO.mdgains one entry for what #1285 left: prefix selectors intest_render_controls.pyandtest_render_threads.pystill spell a suggestion's contribution key.Checked with
test_interact_{session,contract,anchors,product,server}.py(781 passed), and by importing all four scripts and confirmingeval_harness.environment()drops every identity variable.🤖 Generated with Claude Code