Skip to content

Freeze a source document into a draft - #54

Merged
peterbjohnson merged 5 commits into
devfrom
wb/t22
Sep 20, 2026
Merged

peterbjohnson merged 5 commits into
devfrom
wb/t22

Conversation

@peterbjohnson

Copy link
Copy Markdown
Member

The in2lambda agent (sister repo in2lambda-agent, design spec there) copies question text out of the source by line range rather than having a model retype it. For that the source has to be frozen and addressable, and the package has to own that, because the package does every write.

Add in2lambda source add FILE and in2lambda source show. source add turns docx and tex into markdown with pandoc (markdown is taken as it is), hashes the markdown, parses it as commonmark with source positions, and writes draft.json beside it: the source hash, and a block list with an id, a type (heading, paragraph, list item, display maths, image) and a line range per block. source show prints the numbered source with block ids in the margin. The command line becomes a group for this; in2lambda convert FILE FILTER keeps today's behaviour, and the bare form's message is t14.

Done when a synthetic markdown, tex and docx source each produce the expected block list from the test data, and running source add again on a changed file is refused unless asked to start over.


Workbench ticket t22.

@peterbjohnson
peterbjohnson merged commit 51defbf into dev Sep 20, 2026
6 checks passed
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (dev@aab451b). Learn more about missing BASE report.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@          Coverage Diff           @@
##             dev      #54   +/-   ##
======================================
  Coverage       ?   94.21%           
======================================
  Files          ?       19           
  Lines          ?      899           
  Branches       ?        0           
======================================
  Hits           ?      847           
  Misses         ?       52           
  Partials       ?        0           
Flag Coverage Δ
unittests 94.21% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants