Repository navigation
Fix what a Fable agent scripting a Carey brain stumbled on; atlas pictures at any angles - #49
Conversation
A Fable agent registered Carey brain 04-0180 with scripting and every tool, then listed where the library and tools confused it. This fixes the ones that are bugs, missing documentation or misleading words: - look(registrations=...) under a deformed registration crashed: a stored Section (a Pydantic model since the refactor) was copied with dataclasses.replace. It now uses model_copy. - Every object a script gets back (SectionView, AtlasView, AffineView, LayerRef, SectionRaster, FitFrame, AtlasPlane) says what each field holds. SectionRaster carries the pixel size and um_per_px. - Every job folder has scripts/ and scratch/, as AGENTS.md tells agents. - position_sections reports the cutting angles it wrote. - The scripting lines and AGENTS.md say a method can take more arguments than its tool (look's resolution and sheet). - interactive_transform and the linear overlay captions say the transform moves the section onto the atlas, which keeps its place. - Unsupplied cutting angles read as a starting setting, not a measurement. - A one-page opening no longer says "page=1 through page=1". - The placement skill says to follow the section number, not the filename's sort order. tests/test_script_findings.py holds each: an AST check that no stored shape is copied as a dataclass, field documentation on every returned object, the deformed-registration look, the folders, the angles reply and the wording. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis 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: e495e6f2eb
ℹ️ 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".
| flip, rotation_deg | ||
| Its orientation: mirrored left-right, then turned 0, 90, 180 or 270. |
There was a problem hiding this comment.
Document rotation before mirroring in SectionView
For sections with flip=True and a 90° or 270° rotation, the documented operation order produces a different orientation from the image LangSlice actually renders. core/sections/renders.py::render_slice rotates first and then flips left-right, as also documented by Section and SectionRaster. A script following this new field documentation to orient pixels or landmarks will therefore place them incorrectly. Describe the rotation before the flip to match the actual coordinate contract.
Useful? React with 👍 / 👎.
look(mode="atlas", positions_mm=...) and grep_atlas_view take
cutting_angles ({"pitch_deg", "yaw_deg"}) and draw the planes at those
angles, writing nothing; the caption says they were asked for and not
written. Before, an agent had to write the angles to the stack to see a
plane at others, then undo.
elastix_affine flags a fit that scales one axis more than 1.25 times the
other ANISOTROPIC (a warning; the fit is written and undo takes it back).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ools The scripting paragraph of the launch message said the shell was "for what no tool does", and the MCP server's instructions, which every client sees, said to work only through the LangSlice tools. Both now leave the choice to the agent: its own code, any package or published method, beside a tool or in place of one; what it computes counts once it is written into the job. The three register-scripting agent definitions say the same. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Requested by Nash · project thread
Why
Dogfooding PR 48: one Fable agent (xhigh, scripting on, all 31 tools) registered Carey brain 04-0180 on the new main, then listed 24 places where it got stuck or guessed. This PR fixes the bugs, the missing documentation and the misleading words among them.
What changes
Bug:
look(registrations=...)on a deformed registration crashed withTypeError: replace() should be called on dataclass instances, becauseSectionis a Pydantic model since the refactor. It now usesmodel_copy.Fields documented:
SectionView,AtlasView,AffineView,LayerRef,SectionRaster,FitFrameandAtlasPlanesay what each field holds (order offile_size,anglesas(pitch_deg, yaw_deg)...).SectionRastercarriespixel_size_umandum_per_px.Folders: every job folder has
scripts/andscratch/, as AGENTS.md tells agents (the agent's first save failed).Replies:
position_sectionsreportscutting_angles_written; before, an angles-only call replied with empty lists.Wording: a method can take more arguments than its tool (look's
resolution,sheet);interactive_transformand the linear overlay captions say the transform moves the section onto the atlas, which keeps its place; unsupplied cutting angles read as a starting setting; a one-page opening no longer says "page=1 through page=1"; the placement skill follows the section number, not the filename sort.Atlas pictures at any angles:
look(mode="atlas", positions_mm=...)andgrep_atlas_viewtakecutting_anglesand draw the planes there, writing nothing; the caption says the angles were asked for and not written. Checked by eye on a real Carey job: yaw 12° shows the expected left/right asymmetry.Collapsed affine fits:
elastix_affineflagsANISOTROPICwhen one axis is scaled more than 1.25 times the other. A warning only; the fit is written andundotakes it back.Scripting agents may use any method: the launch message's scripting paragraph said the shell was "for what no tool does", and the MCP server instructions every client sees said to work only through the LangSlice tools. Both, and the three register-scripting agent definitions, now say the agent may use its own code, any package or published method, beside a tool or in place of one; what it computes counts once written into the job.
Checks
tests/test_script_findings.py: an AST check that no stored shape is copied withdataclasses.replace, field documentation on every returned object, the deformed-registrationlook, the folders, the angles reply and the opening wording.Left for a decision
Not made, on Nash's call: blocking
fireants_synfrom writing a fit it flags (the agent undoes it instead) and plane-search trial scores. Still open: landmark markers on every overlay, larger tool pictures, hoisting repeated per-section reply blocks.🤖 Generated with Claude Code