Commit caeef62
committed
fix(review): address PR #126 review feedback (iteration 2)
Address review comments from @dealako, @prabodhcs, coderabbitai[bot],
copilot[bot]:
- committee_service.go: reject a missing Heimdall principal with 400 before
the writer is called, rather than persisting an empty last_edited_by —
matches the sibling write handlers (CreateCommitteeLink, etc.) (per
@prabodhcs, @dealako, coderabbitai[bot]).
- committee_service.go: move the nil-writer guard ahead of GetBase so a
misconfigured service fails fast without a wasted storage read (per
@dealako, @prabodhcs).
- group_weekly_brief_writer.go: reject revision==0 as a 400 before the
revision comparison — a persisted brief always has a KV revision >= 1, so
a 0 token is a malformed/missing client value, not a conflict (per
copilot[bot], @prabodhcs).
- design + regen: add dsl.Minimum(1) to the request and response revision
attributes so an invalid token is rejected as 400 at the transport layer
and the >=1 invariant is reflected in the schema (per copilot[bot]).
- group_weekly_brief_writer.go: normalize a zero Now to time.Now().UTC(),
matching the generator, so an omitted Now uses the live window (per
copilot[bot]).
- group_weekly_brief_writer.go: document why the option constructors carry
the ForWriter suffix (package-level name collision with the reader/
generator options; mirrors the generator's ForGenerator) (per @dealako).
- tests: add handler missing-principal -> 400; writer CAS-conflict +
re-read-fails -> propagate original; writer revision==0 -> 400 (per
@dealako).
Resolves 11 review threads; 1 (index-write-after-CAS edge) tracked as a
follow-up.
LFXV2-2194
Signed-off-by: Manish Dixit <mdixit@linuxfoundation.org>1 parent be079f1 commit caeef62
13 files changed
Lines changed: 139 additions & 14 deletions
File tree
- cmd/committee-api
- design
- service
- gen/http
- committee_service
- client
- server
- internal/service
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1564 | 1564 | | |
1565 | 1565 | | |
1566 | 1566 | | |
| 1567 | + | |
1567 | 1568 | | |
1568 | 1569 | | |
1569 | 1570 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1133 | 1133 | | |
1134 | 1134 | | |
1135 | 1135 | | |
| 1136 | + | |
1136 | 1137 | | |
1137 | 1138 | | |
1138 | 1139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1785 | 1785 | | |
1786 | 1786 | | |
1787 | 1787 | | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
1788 | 1793 | | |
1789 | 1794 | | |
1790 | 1795 | | |
| |||
1795 | 1800 | | |
1796 | 1801 | | |
1797 | 1802 | | |
1798 | | - | |
1799 | | - | |
1800 | | - | |
1801 | | - | |
1802 | 1803 | | |
1803 | | - | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
1804 | 1807 | | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
1805 | 1811 | | |
1806 | 1812 | | |
1807 | 1813 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
440 | 440 | | |
441 | 441 | | |
442 | 442 | | |
443 | | - | |
| 443 | + | |
| 444 | + | |
444 | 445 | | |
445 | 446 | | |
446 | 447 | | |
| |||
456 | 457 | | |
457 | 458 | | |
458 | 459 | | |
459 | | - | |
| 460 | + | |
| 461 | + | |
460 | 462 | | |
461 | 463 | | |
462 | 464 | | |
| |||
470 | 472 | | |
471 | 473 | | |
472 | 474 | | |
473 | | - | |
| 475 | + | |
| 476 | + | |
474 | 477 | | |
475 | 478 | | |
476 | 479 | | |
| |||
479 | 482 | | |
480 | 483 | | |
481 | 484 | | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
482 | 502 | | |
483 | 503 | | |
484 | 504 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4558 | 4558 | | |
4559 | 4559 | | |
4560 | 4560 | | |
| 4561 | + | |
4561 | 4562 | | |
4562 | 4563 | | |
4563 | 4564 | | |
| |||
5162 | 5163 | | |
5163 | 5164 | | |
5164 | 5165 | | |
| 5166 | + | |
5165 | 5167 | | |
5166 | 5168 | | |
5167 | 5169 | | |
| |||
Large diffs are not rendered by default.
0 commit comments