Skip to content

docs: harden branch content classification against renames - #5461

Closed
luvs01 wants to merge 3 commits into
lidge-jun:devfrom
luvs01:fix/455-branch-classification
Closed

luvs01 wants to merge 3 commits into
lidge-jun:devfrom
luvs01:fix/455-branch-classification

Conversation

@luvs01

@luvs01 luvs01 commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator

Motivation

  • The T3 content test collected the branch path set with rename detection enabled, so a rename contributed only its destination; a branch that renamed a file could be misclassified as LANDED when dev retained the source.

Description

  • Collect the path set with git diff --no-renames --name-only so both the deleted source and added destination are emitted, and document why rename detection must be off.

Testing

  • Documentation-only change; no code path exercised.

Summary by CodeRabbit

  • Documentation
    • Clarified repository hygiene guidance so file comparisons account for both sides of renamed files.
    • Updated branch-scoring and per-PR verdict instructions to preserve deleted and added paths during comparisons.
    • Added a correction explaining how previous comparisons could miss rename sources and produce inaccurate “landed” results.

@coderabbitai

coderabbitai Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: lidge-jun/opencodex/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 22687dc6-274b-436c-89f3-040d4a8ed150

📥 Commits

Reviewing files that changed from the base of the PR and between 39143fd and 8511a6e.

📒 Files selected for processing (3)
  • devlog/_fin/260904_repo_hygiene_campaign/000_plan.md
  • devlog/_fin/260904_repo_hygiene_campaign/010_method.md
  • devlog/_fin/260904_repo_hygiene_campaign/100_pr_verdicts.md

Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

The content-landing checks now use git diff --no-renames to preserve literal deleted and added paths. The method documentation records the prior false-LANDED failure mode and updates the per-PR verdict measurement command.

Changes

Content comparison correction

Layer / File(s) Summary
Disable rename detection
devlog/_fin/260904_repo_hygiene_campaign/000_plan.md, devlog/_fin/260904_repo_hygiene_campaign/010_method.md
The content-landing and T3 path comparisons now include --no-renames.
Document corrected verdict measurement
devlog/_fin/260904_repo_hygiene_campaign/010_method.md, devlog/_fin/260904_repo_hygiene_campaign/100_pr_verdicts.md
The documentation states that rename detection could hide deleted source paths and updates the measurement command to include --no-renames.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 8511a

This update clarifies rename-safe branch-content classification without changing runtime behavior, so it is ready to merge.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the documentation change and its purpose: hardening branch content classification against file renames. It accurately summarizes the main change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added documentation Improvements or additions to documentation review-ready labels Sep 21, 2026
@github-actions

github-actions Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

✅ READY

  • all PR quality gates passed.

Hygiene

Deterministic PR hygiene checks passed.

@lidge-jun

Copy link
Copy Markdown
Owner

리뷰 · 우선순위 22 / 80

이 PR은 브랜치를 지워도 되는지 적힌 기록 한 줄을 고칩니다. 바뀌는 파일은 devlog/_fin/260904_repo_hygiene_campaign/010_method.md 하나이고, 돌아가는 프로그램은 없습니다.

이 캠페인은 이미 끝났습니다. 로컬 브랜치 71개를 지운 뒤 마감 기록까지 있습니다.

지울지는 네 가지 검사로 정합니다. 이 저장소는 스쿼시 머지를 씁니다. 커밋이 dev의 조상인지만 보면, 이미 들어간 작업도 "아직이다"로 남습니다. 그래서 3번 검사(T3)가 중요합니다. 브랜치가 건드린 파일 목록을 뽑고, 그 파일만 dev와 비교합니다. 차이가 없으면 "이미 반영됨(LANDED)"으로 보고 지워도 된다고 합니다.

예전 목록 명령은 git diff --name-only입니다. git은 이름 바꾸기를 기본으로 알아챕니다. 그러면 목록에 새 이름만 남고, 지워진 옛 이름은 빠집니다. dev가 그 새 파일을 따로 가지고 있고 옛 파일은 그대로 두면, 고른 파일만 비교한 결과는 비어 있습니다. 브랜치와 dev의 파일 전체가 다른데도 LANDED가 됩니다. 이 PR은 목록 명령에 --no-renames를 붙여 옛 이름과 새 이름을 둘 다 뽑게 하고, 그 이유를 문단으로 적습니다.

라인 devlog/_fin/260904_repo_hygiene_campaign/010_method.md 25-30 - 문단은 지금 쓰는 규칙처럼 적혀 있습니다. 같은 파일 아래의 삭제 71개는 이 옵션 없이 집계된 결과입니다. 기록을 이렇게 고치면, 그때도 --no-renames로 지운 것처럼 읽힙니다.

라인 devlog/_fin/260904_repo_hygiene_campaign/000_plan.md 25 - 같은 3번 검사가 예전 명령 그대로입니다.

라인 devlog/_fin/260904_repo_hygiene_campaign/100_pr_verdicts.md 5 - PR을 분류할 때도 git diff --name-only origin/dev...<head>라고만 되어 있습니다. 010만 고치면 같은 폴더의 방법이 둘로 갈라집니다.

라인 devlog/_fin/260904_repo_hygiene_campaign/010_method.md 11 - 판정에 쓰는 두 번째 비교에는 --no-renames가 없습니다. 목록에 옛 경로가 들어가면 그 차이는 보통 빈 결과가 아니므로, 본문이 말한 잘못은 첫 명령 수정으로 막힙니다. 이 파일은 예전에 실패한 검사를 브랜치 이름(feat/macos-app, cursor-call-prerebase-260818)으로 적었습니다. 이번 경우는 그런 예시가 없습니다.

메인테이너의 판단이 필요한 지점

끝난 _fin 기록에 고친 명령을 넣을지, 다음에 브랜치를 지울 때 볼 곳에만 적을지입니다. 두 번째 git diff에도 --no-renames를 붙일지도 정하면 됩니다. 이번 설명의 구멍은 목록을 뽑는 첫 명령으로 막힙니다.

너의 추천

이름 바꾸기를 끄라는 설명은 맞습니다. 베이스는 dev입니다. types.ts/config.ts를 나누는 변경이 아니고, 같은 주제로 열린 PR은 이것뿐입니다. 본문을 그때 실행한 명령인 것처럼 덮어쓰지 마세요. "2026-09-21 이후에 다시 돌릴 때는 --no-renames를 쓴다. 마감 때 지운 71개는 이 옵션이 없었다"라고 날짜를 적어 두세요. 000_plan.md100_pr_verdicts.md의 같은 명령도 같이 고치세요. 잘못 LANDED가 된 브랜치가 있으면 이름을 한 줄 남기고, 없으면 측정된 사고가 아니라 미리 막는 주의라고 적으세요. 이 PR을 머지해도 지금 브랜치를 지우는 동작은 바뀌지 않습니다.

이 댓글은 grok-bot이 작성했습니다

@luvs01

luvs01 commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator Author

Review feedback applied on d31674497d:nn- 010_method.md: the --no-renames wording is now a dated correction (2026-09-21) instead of reading as if it were always the rule; it also notes no wrongly-LANDED branch was identified - preventive, not a measured incident. The second diff now uses --no-renames too.n- 000_plan.mdand100_pr_verdicts.md: the same listing command is aligned to --no-renames`, with a pointer back to 010.

@lidge-jun

Copy link
Copy Markdown
Owner

Thanks @luvs01. This is carried in #5600 with your commits (a3f699f, a4d343c) kept as authored. A follow-up commit (5c9a16f) clarifies in 000_plan.md and 100_pr_verdicts.md that the recorded campaign ran without --no-renames, so the old verdicts are not read as rechecked. Closing in favor of #5600.

@lidge-jun lidge-jun closed this Sep 22, 2026
lidge-jun added a commit that referenced this pull request Sep 23, 2026
…top, reauth unknown_flow, Raycast probe, pool golden, no-renames) (#5600)

* docs: harden branch content classification against renames

* docs: date the no-renames correction and align sibling commands

* test(oauth): exercise configured generic pool validators

* test(oauth): prove the generic null-strategy clear and harden test teardown

* test(oauth): require the strategy property in the cleared response

* fix(integrations): harden Raycast defaults probe

* test(integrations): cover killed defaults probe in Raycast detection

* fix(reauth): stop polling terminal unknown flows

* fix(qoder): preserve offsets in scaffold scanning

* fix(responses): keep a cyber-policy stop when a 5xx body has malformed UTF-8

consumeComboFailure read 5xx bodies with fatalUtf8, so a single malformed
byte rejected the whole read and replaced an otherwise recognizable
cyber-policy refusal with "Provider error <status>". The combo then hopped
instead of stopping.

readBoundedResponseBody gains reportUtf8Validity: it decodes with
replacement characters and reports utf8Valid at EOF (true by construction
when fatalUtf8 is also set). consumeComboFailure keeps every existing trust
rule for malformed 5xx bodies -- no quota evidence, usage, or ordinary
classification -- and only lets the lenient decode through when it
identifies a cyber-policy refusal. The quota agreement with
shouldRetryCodexPoolAccountQuota is unchanged.

Reimplements #5307 with a narrower classification gate.

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>

* docs: separate the campaign command from the corrected rerun command

The branch and PR classification summaries showed the --no-renames form as though the campaign had used it. State the command that produced the recorded verdicts and the form any rerun must use, matching the correction in 010_method.md.

Follow-up to #5461.

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>

* test(oauth): restore the pool-validator home even when shutdown throws

A throwing server.stop skipped the OPENCODEX_HOME restore and temp-dir removal, leaking both into later cases. Run cleanup in an inner finally.

Follow-up to #5442.

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>

* test(integrations): model a killed defaults probe with a type-safe result

The timeout case cast a result with exitCode null directly to typeof Bun.spawnSync, which strict TypeScript can reject, and its empty stdout could not tell an exit-code check from an empty read. Cast through unknown, cover null and non-zero exits, and return "1" on stdout so ignoring the exit code would visibly report Pro.

Follow-up to #5244.

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>

* docs(structure): record the terminal unknown_flow GET in the reauth contract

The dashboard contract said a non-2xx GET keeps cancellation ownership and polling, and that no replacement login POST can appear before DELETE settles. A GET 404 unknown_flow now ends the flow the same way the DELETE path does, so qualify both statements as applying to retryable GET errors and state the exception in the overview.

Follow-up to #5428.

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>

* fix(qoder): keep single-unit Unicode case folding in scaffold scanning

Matching markers with ASCII-only folding kept offsets correct but dropped matches the lowercased scan used to make: U+212A KELVIN SIGN lowercases to an ASCII k, so <invo\u212Ae> tool markup passed through unsuppressed, whole or split across deltas. Fold each code unit as toLowerCase() does when the result is a single code unit; characters that expand, such as U+0130, still cannot shift offsets.

Follow-up to #5366.

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>

* docs(pr-assets): add the reauth unknown_flow GET before/after capture

Main-account card rendered with the dev hook and the branch hook against a mocked management API (Cancel DELETE 503, then GET 404 unknown_flow). Synthetic identity only.

Follow-up to #5428.

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>

* test(responses): keep a non-replayable malformed cyber stop free of retry metadata

Carries the #5307-related part of cc466ed, which the author added after consolidating #5307 into #5553: a malformed 502 cyber-policy body that was marked non-replayable must keep the marker, carry no Retry-After or quota reset, and still stop the combo. Document the malformed-body contract in the responses structure doc, matching the narrower classification gate this branch implements.

Follow-up to #5307 (via #5553).

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>

---------

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants