Skip to content

postprocess: fix configuration and filtering papercuts - #1996

Open
thedataking wants to merge 6 commits into
masterfrom
perl/postprocess-cleanup
Open

thedataking wants to merge 6 commits into
masterfrom
perl/postprocess-cleanup

Conversation

@thedataking

@thedataking thedataking commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

First in the stack; followed by #1997.

Fix independent postprocessor papercuts, one per commit:

  • Resolve exclude-file paths consistently and combine equivalent entries, with regression tests.
  • Honor configured CRISP/explicit-key clients, with retry coverage.
  • Catch the standard-library JSON decoding exception.
  • Import the model interface directly from the models package.
  • Remove obsolete interface sketches and completed TODOs.
  • Correct the identifier-filter documentation.

Prompts and cache keys are unchanged.

Validation: 60 tests passed; four tests requiring a local c2rust binary skipped. Ruff format, Ruff lint, and ty passed. No live model calls.

Mixed absolute and relative source/exclude arguments could raise
ValueError before processing any functions. Resolve both sides before
matching, and union whole identifiers for equivalent YAML paths.

Cover path combinations, entries outside the exclude directory, and
equivalent entries without splitting identifiers into characters.
Generation rechecked provider environment variables after model
selection, silently skipping CRISP endpoints and clients constructed
with an explicit API key. Use the selected cache-only mock to decide
whether generation is available.

Exercise retries with a configured fake model that needs no provider
environment variable.
json.loads raises json.JSONDecodeError, not the requests exception.
Catch the correct exception so malformed compile_commands.json files
receive the intended path-specific error. This also removes an
undeclared requests import.
The CLI uses the model interface independently of comment transfer.
Import it from the models package instead of relying on an incidental
import in the comments transform.
Delete commented-out model and validator interface sketches, along
with TODOs for model and cache options that already exist. Active
interfaces and behavior are unchanged.
The filter selects matching identifiers for processing; the README
incorrectly described matches as excluded.
@thedataking
thedataking force-pushed the perl/postprocess-cleanup branch from c42d3be to f7cbb5e Compare September 7, 2026 03:39
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.

1 participant