Repository navigation
Commit d99bedd
feat(S0-B):
Part B of S0 (Part A shipped the extractor `fix` metadata). A new
`python -m ownlang own-fix subscriptions candidates <facts.json> --config <own.toml>
--class <FQN> [--finding-id <ID>]... --output <candidates.json> [--root <dir>]`
turns the `--fix-candidates` facts into a deterministic candidates.json. It changes
no source — the C# `fix` block already carries the semantics; this only assembles,
identifies, filters and orders.
Per the locked contract:
- `--class` is an EXACT fully-qualified name; a partial / nested / generated /
duplicate-FQN / unknown type is a hard error.
- `finding_id` is versioned and LINE-INDEPENDENT:
SHA256(version . containing_type . enclosing_member . event_identity .
source_identity . handler_identity . occurrence_ordinal) — span/line are location
metadata, never in the id.
- `target_api` is PINNED from config (`[weak-subscription].target`, or the sole
`subscribe` entry) — several entries with no target is a hard error, never a silent
first-pick.
- `allowed_actions` = `[convert_acquire, manual_review]` only for a proven
INotifyPropertyChanged contract, else `[manual_review]`. `convert_exact_teardown`
is NOT offered in S0 (deferred to S2 with a pinned remove API); teardown metadata is
carried but grants no conversion.
- a released subscription is not a leak, so not a candidate; candidates are
deterministically ordered (file, span start, id); every source file gets a SHA-256
(S2 refuses if the file changed); the output carries the selection-request safety
envelope (allowed_types, selected_findings, constraints).
`--finding-id` filters and hard-fails on any unknown id (the chicken-and-egg fix:
no ids = discover all eligible; ids = explicit final selection).
`ownlang/fix_candidates.py` (core), `ownlang/config.py::load_target_subscribe`,
`own-fix` dispatch in `__main__.py`, `tests/test_fix_candidates.py` (18 checks:
line-independence, INPC permission tiering, released-skip, per-file SHA, ordering,
partial/nested/generated/dup/unknown/unknown-id rejections, target pinning), an
end-to-end CI step over the real extractor facts, and a `spec/CLI.md` row.
Local: ruff + mypy (ownlang) + run_tests (18/0) green; end-to-end own-fix over the
extractor facts verified.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JxKjqdGEFzq4UzZupw379Gown-fix subscriptions candidates — the analysis-only candidate collector1 parent 52ec06b commit d99bedd
6 files changed
Lines changed: 604 additions & 4 deletions
File tree
- .github/workflows
- ownlang
- spec
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1632 | 1632 | | |
1633 | 1633 | | |
1634 | 1634 | | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
1635 | 1679 | | |
1636 | 1680 | | |
1637 | 1681 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
403 | 403 | | |
404 | 404 | | |
405 | 405 | | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 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 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
406 | 491 | | |
407 | 492 | | |
408 | 493 | | |
409 | 494 | | |
410 | 495 | | |
411 | 496 | | |
412 | 497 | | |
413 | | - | |
| 498 | + | |
414 | 499 | | |
415 | 500 | | |
416 | 501 | | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
417 | 507 | | |
418 | 508 | | |
419 | 509 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | | - | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
57 | | - | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
70 | 108 | | |
71 | 109 | | |
72 | 110 | | |
| |||
0 commit comments