Skip to content

fix: accept whitespace after full-rewrite fence languages - #523

Open
jipeng6036-del wants to merge 1 commit into
algorithmicsuperintelligence:mainfrom
jipeng6036-del:fix/full-rewrite-fence-whitespace
Open

jipeng6036-del wants to merge 1 commit into
algorithmicsuperintelligence:mainfrom
jipeng6036-del:fix/full-rewrite-fence-whitespace

Conversation

@jipeng6036-del

@jipeng6036-del jipeng6036-del commented Oct 21, 2026 •

Copy link
Copy Markdown

Full-rewrite responses with a space or tab after the opening fence language fall through to the generic fence parser. That leaves python in the extracted program and causes evaluation to fail with NameError.

I allow trailing horizontal whitespace in the language-specific parser and added a regression that executes the extracted function across spaces/tabs and LF/CRLF endings.

Validation:

  • Full unit suite on Linux/Python 3.10: 701 tests, 2 skipped; the unchanged baseline also passes.
  • Full integration suite against the real local codelion/dhara-250m model: 41 passed. The unmodified repository CI passes both jobs at this exact commit.
  • Repository isort/Black hooks pass.
  • Ran the actual CLI, process worker, evaluator and checkpoint path against a loopback response fixture: ordinary fences work before and after; whitespace variants fail before and return the expected result after.

@CLAassistant

CLAassistant commented Oct 21, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants