Commit 1d4da22
authored
Harden multilingual decoder verification and restore follow-up test coverage (#82)
## Summary
Follow-up to #67. This PR hardens the multilingual decoder/codegen
pipeline by tightening interface completeness checks, generated-artifact
hygiene, C/C++ verification semantics, and planner prompt safety. It
also restores the extracted multilingual regression tests that were
moved out of the original #67 branch for a follow-up PR.
## What changed
### Decoder and verification hardening
- Build C/C++ CMake targets before running `ctest`, so verification does
not falsely pass or fail because test executables were never built.
- Treat C/C++ `make test` targets that only compile objects, without
actually running tests, as verification errors instead of successful
test runs.
- Skip generated/build/cache directories when collecting C/C++ source
files for syntax and verification commands.
- Improve C/C++ prompt rules to:
- avoid editing build/cache/generated artifacts,
- use full CMake build + CTest commands,
- avoid relying on undeclared/transitively included helper functions,
- report explicit syntax-check summaries.
### Generated artifact hygiene
- Add a shared generated-artifact classifier and prompt rule helper.
- Install local `.git/info/exclude` hygiene rules during batch startup.
- Reject persisted generated artifacts before post-verify and after
verification runs.
- Prevent batch branches containing generated artifacts from being
merged.
### Interface and planner robustness
- Deduplicate repeated whole-file `file_code` blocks in
`interfaces.json` before serialization and before planner prompt
construction.
- Add interface coverage validation so `plan_tasks` fails fast when
`interfaces.json` does not cover all skeleton features.
- Improve Python dependency collection for same-file calls and
`self.method()` invocations.
- Save in-progress interface generation to `interfaces.json.partial` and
only overwrite the canonical `interfaces.json` after successful
completion.
- Allow interface review additions to scaffold missing file entries
under existing feature subtrees.
### Parser and language detection fixes
- Classify header-heavy mixed C/C++ repositories as C++ when C and C++
votes appear together.
- Harden fallback string-literal stripping against catastrophic regex
backtracking on unterminated escaped strings.
### Final validation behavior
- Propagate smoke-test failures into the final validation result instead
of allowing a successful unit-test result to mask a failed smoke check.
- Clarify that `plan --check-only` warning states are not complete/done
states and should not allow downstream stages to proceed.
## Test coverage
This PR adds extensive regression coverage for the multilingual
pipeline, including:
- generated artifact hygiene,
- interface source deduplication,
- skeleton/interface coverage validation,
- multilingual dependency graph behavior,
- multilingual encoder/codegen behavior,
- planner language support and prompt deduplication,
- C/C++/Go/Rust/TypeScript/JavaScript/Python parser behavior,
- decoder language backends and planning phases,
- zero-test guard behavior,
- final test repair,
- repo language resolution,
- orphan/test/build exclusion handling,
- smoke multilingual coverage.
The diff adds 33 new test files and restores the extracted multilingual
tests intended for this follow-up PR.
## Notes for reviewers
- This branch was rebased on top of the squash-merged #67 commit, so the
PR diff should now represent only the follow-up hardening and restored
tests.
- `run_batch` / `post_verify` now update `.git/info/exclude` with local
generated-artifact exclusions. This is intentionally local-only and
non-destructive.
- `plan_tasks` now fails on incomplete interface coverage instead of
silently planning from stale or partial interfaces.
- C/C++ projects whose `make test` target only compiles objects but does
not execute tests will now be rejected as invalid verification results.1 parent 2265cf2 commit 1d4da22
57 files changed
Lines changed: 8676 additions & 70 deletions
File tree
- CoderMind
- scripts
- code_gen
- common
- decoder_lang
- tests
- func_design
- lang_parser
- extractors
- templates/commands
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
212 | 213 | | |
213 | 214 | | |
214 | 215 | | |
| 216 | + | |
215 | 217 | | |
216 | 218 | | |
217 | 219 | | |
| |||
413 | 415 | | |
414 | 416 | | |
415 | 417 | | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
416 | 461 | | |
417 | 462 | | |
418 | 463 | | |
| |||
425 | 470 | | |
426 | 471 | | |
427 | 472 | | |
428 | | - | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
429 | 479 | | |
430 | 480 | | |
431 | 481 | | |
| |||
513 | 563 | | |
514 | 564 | | |
515 | 565 | | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
516 | 576 | | |
517 | 577 | | |
518 | 578 | | |
| |||
526 | 586 | | |
527 | 587 | | |
528 | 588 | | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
529 | 596 | | |
530 | 597 | | |
531 | 598 | | |
| |||
542 | 609 | | |
543 | 610 | | |
544 | 611 | | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
545 | 619 | | |
546 | 620 | | |
547 | 621 | | |
| |||
886 | 960 | | |
887 | 961 | | |
888 | 962 | | |
| 963 | + | |
889 | 964 | | |
890 | 965 | | |
891 | 966 | | |
| |||
938 | 1013 | | |
939 | 1014 | | |
940 | 1015 | | |
941 | | - | |
| 1016 | + | |
942 | 1017 | | |
943 | 1018 | | |
944 | 1019 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
49 | 75 | | |
50 | 76 | | |
51 | 77 | | |
| |||
238 | 264 | | |
239 | 265 | | |
240 | 266 | | |
| 267 | + | |
| 268 | + | |
241 | 269 | | |
242 | 270 | | |
243 | 271 | | |
| |||
293 | 321 | | |
294 | 322 | | |
295 | 323 | | |
| 324 | + | |
296 | 325 | | |
297 | 326 | | |
298 | 327 | | |
| |||
303 | 332 | | |
304 | 333 | | |
305 | 334 | | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
306 | 349 | | |
307 | 350 | | |
308 | 351 | | |
309 | 352 | | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
310 | 357 | | |
311 | 358 | | |
312 | 359 | | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
318 | 368 | | |
319 | 369 | | |
320 | 370 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
| |||
141 | 145 | | |
142 | 146 | | |
143 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
144 | 157 | | |
145 | 158 | | |
146 | 159 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
27 | 32 | | |
28 | 33 | | |
29 | | - | |
30 | 34 | | |
31 | 35 | | |
32 | 36 | | |
| |||
61 | 65 | | |
62 | 66 | | |
63 | 67 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
68 | 78 | | |
69 | 79 | | |
70 | 80 | | |
| |||
137 | 147 | | |
138 | 148 | | |
139 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
140 | 159 | | |
141 | 160 | | |
142 | 161 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
0 commit comments