Skip to content

Commit acada3c

Browse files
author
jun0
committed
[rustjava-adopt-classfile-error-cause-decision-p0-fix2] docs: 「dedup 이 덮는다」 잔존 3곳을 닫고 포인터를 :450 으로 고친다
R1(major) — dedup 블록은 f1c1a1d 에서 제거됐는데 그것이 «존재하며 무언가를 덮는다»고 말하는 문장이 셋 남았다: worklog issues[1](★기계가 읽는 자리) · REPORT.md:11 ⒝ · worklog .md:46. 셋 다 HEAD 에서 거짓이고, 같은 파일의 다른 줄(REPORT :10 · worklog .md:53)이 「걷어냈다」고 적어 자기모순이었다. 셋 다 과거형 교정으로 닫았다. ★직전 회차의 전수 검색이 왜 놓쳤나: 패턴이 «잡는다»라는 «동사»에 묶여 있었고 잔존 셋은 전부 다른 동사였다(covers · 덮는다 · 단언한다). 이번엔 검수자 처방대로 «주어»로 훑었다(dedup · 서로 다름 · seen · distinct) — 잔존 6건 전부 「걷어냈다」 문맥임을 확인했다. 권고분 — `:452` 포인터 4곳을 `:450` 으로. HEAD 의 :452 는 `}` 라 허공을 가리켰다. 줄번호는 베끼지 않고 직접 셌다(grep -n 'err.contains(cause)' → 450). 양방향 재확인(내 측정): 정상 green 17/0 · 제품이 두 사유를 접음 → red at :450 · 개악 유지한 채 contains 무력화 → green(= contains 가 유일한 포수). 접촉 4파일 전부 문서 — `.rs` 무접촉(제품 동작 추가 변경 0) · cargo test --all 579/0/1.
1 parent f1c1a1d commit acada3c

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

‎REPORT.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
- ★★**사유를 꿰자마자 «평평한 오류가 가리고 있던 것 둘»이 나왔다**:
88
⑴**테스트가 «어느 층이 거부하는지»를 틀리게 믿고 있었다** — 「인덱스가 엉뚱한 종류를 가리킨다」는 **검증**이 아니라 ★**파서**가 거부한다(`truncated or unparsable class file`). ★**코드를 추측에 맞추지 않고 단언을 실측에 맞췄다**(주석에 「measured, not assumed」).
99
⑵**술어 이름이 낡아 있었다** — `bootstrap_method_static_arguments_are_in_the_pool` 은 이름과 달리 **「적재 가능 상수인가」까지** 요구한다(직전 회차가 넓혔고 자기 docstring 이 그렇게 적는다). 사유는 **규칙 그대로** 적고 ★**함수 이름은 바꾸지 않았다**(리팩터 = 범위 밖).
10-
- ★★**양방향 — 세 층 «전부»에 개악**: **M1** `src/runtime.rs` 가 다시 문자열을 박는다 → red · **M2** `From` 이 다시 사유를 버린다(제안이 지목한 그 버그) → red · **M3** 두 사유를 한 문자열로 접는다 → red · 복원 **17/0**. ★★**M3 을 잡는 것은 줄마다의 `assert!(err.contains(cause))` 다**(`tests/test_class_format.rs:452` — 실행이 루프 끝에 **도달조차 하지 않는다**). ★**초판은 이것을 시험 말미의 dedup 단언에 귀속시켰는데 틀렸다** — 그 벡터에 담기던 것은 제품의 출력이 아니라 **표의 기대 리터럴**이라 **상수끼리 비교**했고 제품이 무엇을 내든 결과가 같았다. ⇒ ★**주석만 고치지 않고 그 블록을 걷어냈다**(잃는 것은 아래 대가에 적는다).
11-
- ★★**대가 — 실측한 구멍 하나를 포함해 적는다**: ⒜★**마지막 홉이 «두 번» 쓰여 있고 한 쪽만 테스트가 본다** — `test-utils/src/lib.rs` 사본만 개악하면 `cargo test --all` 이 **579 passed / 0 failed**(아무것도 안 운다). ★**합치는 것은 리팩터라 하지 않았고 구멍을 보고한다.** ⒝사유가 문자열이라 **두 규칙에 같은 문구**를 주는 것을 막는 것이 없다(dedup 단언은 세 픽스처만 덮는다) ⒞★**픽스처 규율을 대체하지 않는다**(제안이 이미 적었다) ⒟★**PR #66 과 같은 함수를 만진다** — 뒤에 착지하는 쪽이 base 를 당겨 그 항을 다시 쪼갠다(충돌은 실재하나 **기계적**).
10+
- ★★**양방향 — 세 층 «전부»에 개악**: **M1** `src/runtime.rs` 가 다시 문자열을 박는다 → red · **M2** `From` 이 다시 사유를 버린다(제안이 지목한 그 버그) → red · **M3** 두 사유를 한 문자열로 접는다 → red · 복원 **17/0**. ★★**M3 을 잡는 것은 줄마다의 `assert!(err.contains(cause))` 다**(`tests/test_class_format.rs:450` — 실행이 루프 끝에 **도달조차 하지 않는다** · ★초판은 `:452` 라 적었으나 dedup 2줄 제거로 **:450 으로 옮겨졌다**). ★**초판은 이것을 시험 말미의 dedup 단언에 귀속시켰는데 틀렸다** — 그 벡터에 담기던 것은 제품의 출력이 아니라 **표의 기대 리터럴**이라 **상수끼리 비교**했고 제품이 무엇을 내든 결과가 같았다. ⇒ ★**주석만 고치지 않고 그 블록을 걷어냈다**(잃는 것은 아래 대가에 적는다).
11+
- ★★**대가 — 실측한 구멍 하나를 포함해 적는다**: ⒜★**마지막 홉이 «두 번» 쓰여 있고 한 쪽만 테스트가 본다** — `test-utils/src/lib.rs` 사본만 개악하면 `cargo test --all` 이 **579 passed / 0 failed**(아무것도 안 운다). ★**합치는 것은 리팩터라 하지 않았고 구멍을 보고한다.** ⒝사유가 문자열이라 **두 규칙에 같은 문구**를 주는 것을 막는 것이 ★**아무것도 없다** — 초판이 그것을 막는다고 적은 dedup 단언은 공허했고 **걷어냈다**(:10) ⇒ 남는 보장은 `contains` 가 덮는 **그 세 픽스처**뿐이다 ⒞★**픽스처 규율을 대체하지 않는다**(제안이 이미 적었다) ⒟★**PR #66 과 같은 함수를 만진다** — 뒤에 착지하는 쪽이 base 를 당겨 그 항을 다시 쪼갠다(충돌은 실재하나 **기계적**).
1212
- 검증: `cargo test --all` **578 → 579 / 0 failed / 1 ignored** · `classfile` **15+13/0** · `check-dod-ci-parity` → **「OK 두 축 모두 대칭차 0 — 명령 6개 · toolchain 2개로 «둘 다 일치»」**(rc=0 · ★수를 직접 세지 않는다 — `CLAUDE.md` §DoD 규율).
1313

1414
## [2026-09-17] ldc 픽스처를 ASM 으로 재생성하자 — ★**기각**(rustjava-adopt-ldc-tags-real-world-generator-survey-p0)

‎STATE.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
- [rustjava-adopt-classfile-error-cause-decision-p0] ★★**거부 사유를 세 층에 꿴다 — 「Invalid class file」 하나가 **14개** 문장이 된다(클래스 8 · 필드 3 · 메서드 3).** 채택 제안 `2026-09-17-classfile-error-cause-decision#p0`. ★**제품 동작 변경 있음**(사용자가 보는 `ClassFormatError` 메시지).
1111
★제안이 **all-or-nothing** 이라 못박은 넷을 다 했다: `InvalidFormat(&'static str)` · `InvalidClassFile(&'static str)`(★`From` 이 **버리던** 자리) · 경계 2자리 · ★**`validate_class` 8항 `||` → 규칙마다 `if`**.
1212
★★**사유를 꿰자 «평평한 오류가 가리던 것 둘»이 나왔다**: ⑴테스트가 **어느 층이 거부하는지를 틀리게 믿었다**(검증 아닌 **파서**) ⇒ ★단언을 실측에 맞췄다 ⑵술어 **이름이 낡아 있었다**(「in_the_pool」인데 **적재 가능성까지** 본다) ⇒ 사유는 규칙대로, ★**이름은 안 바꿨다**(리팩터 금지).
13-
★**양방향 — 세 층 전부 개악**: M1 경계 · M2 `From` 이 사유 버림 · M3 두 사유를 한 문자열로 접음(★잡는 것은 `contains` `:452` — 초판이 귀속한 dedup 단언은 **상수 대 상수라 공허**했고 **걷어냈다**) · 복원 17/0.
13+
★**양방향 — 세 층 전부 개악**: M1 경계 · M2 `From` 이 사유 버림 · M3 두 사유를 한 문자열로 접음(★잡는 것은 `contains` `:450`(dedup 제거로 452→450) — 초판이 귀속한 dedup 단언은 **상수 대 상수라 공허**했고 **걷어냈다**) · 복원 17/0.
1414
★★**대가**: ★**마지막 홉이 두 번 쓰여 있고 `test-utils` 사본은 «무검증»**(개악해도 579/0 · **합치지 않고 보고**) · 사유가 문자열이라 같은 문구 중복을 막는 것이 없다 · ★**PR #66 과 같은 함수**(충돌은 기계적).
1515
★`--all` **578 → 579/0/1** · `check-dod-ci-parity` → **「OK 두 축 모두 대칭차 0 — 명령 6개 · toolchain 2개로 «둘 다 일치»」**(rc=0).
1616
- [rustjava-adopt-ldc-tags-real-world-generator-survey-p0] ★★**「ldc 픽스처를 ASM 으로 재생성」 제안 — 기각.** ★**제품 코드 0줄**(`declinedProposals` 기록).

‎docs/worklog/2026-09-18-classfile-error-cause.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
],
1515
"verification": [
1616
"MUTATION M2, make the From impl drop the cause again (the exact bug the proposal named): test_a_rejected_class_says_why red",
17-
"MUTATION M3, collapse two distinct causes to one string in validate_class: red — caught by the per-row `assert!(err.contains(cause))`, measured: the failure is reported at tests/test_class_format.rs:452 and execution never reaches the end of the loop. An earlier draft of this round credited a dedup assertion at the end of the test; that was wrong, because the vector it de-duplicated held the table's expected literals rather than anything the product said, so it compared constants to constants and could not fail. Proven by neutering `contains` while the collapse was still applied: the test then passed. The dedup block has been removed rather than left as a comment claiming a guarantee it did not provide",
17+
"MUTATION M3, collapse two distinct causes to one string in validate_class: red — caught by the per-row `assert!(err.contains(cause))`, measured: the failure is reported at tests/test_class_format.rs:450 and execution never reaches the end of the loop. An earlier draft of this round credited a dedup assertion at the end of the test; that was wrong, because the vector it de-duplicated held the table's expected literals rather than anything the product said, so it compared constants to constants and could not fail. Proven by neutering `contains` while the collapse was still applied: the test then passed. The dedup block has been removed rather than left as a comment claiming a guarantee it did not provide",
1818
"MUTATION M1, make src/runtime.rs hardcode \"Invalid class file\" again: red. This is the third of the three layers, so the whole path is covered by a mutation.",
1919
"restore after each: test_class_format 17 passed / 0 failed",
2020
"FINDING 1 — a test believed the wrong layer. classfile/tests/test.rs asserted that an index naming the wrong constant kind is refused by validation; the cause says it is refused by the parser (\"truncated or unparsable class file\"). The assertion was corrected to the measurement rather than the code to the assumption, and the comment now says it was measured.",
@@ -24,7 +24,7 @@
2424
],
2525
"issues": [
2626
"COVERAGE GAP, measured not assumed: the last hop is written twice — src/runtime.rs and test-utils/src/lib.rs — and only the first is under test. Mutating the test-utils copy to drop the cause leaves cargo test --all at 579 passed / 0 failed. Deduplicating them is a refactor and was not done; the gap is reported instead.",
27-
"The causes are strings, so nothing stops two rules from being given the same wording. The dedup assertion in test_a_rejected_class_says_why covers the three fixtures it names and nothing else.",
27+
"The causes are strings, so nothing stops two rules from being given the same wording, and nothing in the suite checks that they do not. An earlier draft of this round claimed a dedup assertion covered it; that assertion compared the table's expected literals to each other rather than anything the product said, so it could not fail, and it has been removed. What remains is the per-row `assert!(err.contains(cause))`, which covers exactly the three fixtures that test names.",
2828
"This does not replace the shaped-fixture discipline, as the proposal said: a cause names which check fired, not whether every axis inside a multi-axis check is observable.",
2929
"Scope collision: PR #66 (open) also edits validate_class's chain. Whichever lands second pulls base and re-splits the added term — the conflict is real but mechanical, and both changes are additive within the same function.",
3030
"UPSTREAM DIVERGENCE: docs/upstream-sync-approach.md section 3-B closes the message axis with \"upstream wins on wording\", and this round reopens it — every rejection message in classfile/src/validation.rs is now ours and differs from upstream's single \"Invalid class file\". The next sync round meets this file first, so the cost is named here rather than discovered there."

‎docs/worklog/2026-09-18-classfile-error-cause.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ classfile::ClassFileError::InvalidFormat(&'static str)
4040
|---|---|
4141
| **M1** `src/runtime.rs` 가 다시 `"Invalid class file"` 를 박는다 | ★**red** |
4242
| **M2** `From` 이 다시 사유를 **버린다**(제안이 지목한 바로 그 버그) | ★**red** |
43-
| **M3** 서로 다른 두 사유를 **한 문자열**로 접는다 | ★**red** — 줄마다의 `assert!(err.contains(cause))` 가 잡는다(`tests/test_class_format.rs:452`) |
43+
| **M3** 서로 다른 두 사유를 **한 문자열**로 접는다 | ★**red** — 줄마다의 `assert!(err.contains(cause))` 가 잡는다(`tests/test_class_format.rs:450`) |
4444
| 복원 | **green** 17/0 |
4545

46-
★**M3 이 없으면** 「전부 같은 문자열로 되돌려도 통과」가 가능하다 — 그래서 테스트가 **사유들이 서로 다름**까지 단언한다.
46+
★**M3 이 없으면** 「전부 같은 문자열로 되돌려도 통과」가 가능하다 — 그것을 잡는 것은 줄마다의 `contains` 다(아래 §대가). ★**초판은 여기에 「테스트가 «사유들이 서로 다름»까지 단언한다」고 적었는데 거짓이었다** — 그 단언은 상수끼리 비교해 공허했고 걷어냈다.
4747

4848
## ★대가 — 실측한 구멍 하나를 포함해서
4949

0 commit comments

Comments
 (0)