Repository navigation
fix(egosuite): refuse invalid compare summaries - #272
Merged
kstonekuan merged 1 commit intoAug 30, 2026
Merged
kstonekuan merged 1 commit into
kstonekuan merged 1 commit into
Conversation
kstonekuan
approved these changes
Aug 30, 2026
Contributor
There was a problem hiding this comment.
LGTM. Hoisting the handler around the match covers the next subcommand too.
Validated on 69de54a: root suite 1,195 passed, 6 skipped; example suite 11 passed; ruff, format, ty clean on both projects. Moved compare back outside the try and confirmed exactly your two refusal tests go red, other nine stay green.
One ask, same as always and not a rule: leave the good first issue pool for newcomers where you can. You've got three merges now, and the starter queue is what keeps new people arriving. Higher-leverage work if you want it: run HFlow against a real corpus, Egocentric-10K or Egocentric-100K on HF, and report what breaks, what's slow, what's awkward. See #287.
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.
Closes #266.
Summary
FileNotFoundError,RuntimeError, andValueErrorboundary around subcommand dispatchWhy
comparepreviously allowed filesystem and JSON decoder failures to escape as Python tracebacks, returning exit code 1 even though no comparison had taken place. Both conditions now exit 2 because the input could not be used, matching the convention documented indocs/FORMAT.md.The error boundary now wraps the command dispatch itself instead of being copied into a third match arm. This preserves the existing behavior of
labelsandrunwhile making the same protection the default for future subcommands. Successful comparisons retain their existing computation and output unchanged.The related #260 was assigned but did not yet have a PR when this change was prepared, so there was no submitted implementation to align with.
Validation
uv sync --locked --all-extras— passeduv run ruff check --fix— passeduv run ruff format— passeduv run ty check— passeduv run pytest -q— 1,195 passed, 6 skippeduv run --locked --project examples/egosuite_evaluation pytest -q examples/egosuite_evaluation/tests— 11 passedgit diff --check— passedChecklist
compareinto the existing documented exit-code convention.uv run ruff check --fix,uv run ruff format, anduv run ty check.