Repository navigation
fix(lint): bump old-collab-literals baseline for #4801's deliberate room-doc literals - #4806
Conversation
…oom-doc literals #4801 (merged cb99b4e) intentionally added two new `room-doc` occurrences — a legacy socket-path fallback string and a descriptively-named test function — without running `--update` in the same commit as its own message instructs. That left main failing its own lint gate for every PR based on it (confirmed on #4580 and #4721's CI, and reproduced locally against origin/main HEAD). Bumps skills/room-collab/scripts/room_collab.py and tests/room-collab-cli.test.py from 4 to 5 each, matching the actual (deliberate, unchanged) content. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
@qingyun-wu @keweichen — flagging this as urgent-ish: This PR (#4806) is the single missing |
Coverage Gate✅ Diff coverage PASSES the 95% bar. Whole-tree (informational): 90%. Diff CoverageDiff: origin/main...HEAD, staged and unstaged changesNo lines with coverage information in this diff. |
keweichen
left a comment
There was a problem hiding this comment.
REQUEST_CHANGES at a208e7cfdc1e9444185186997c5ed9876558c724 (merge-base cb99b4e7e9f44055f57e9348fa36be2a013cc1f2).
The main failure is real, and the production-file baseline increase is justified: at the parent, both the direct lint and its test fail with the two reported 4 -> 5 increases; at this head they pass. One of the two proposed exceptions is not a compatibility literal, though.
-
[P2] Do not baseline an avoidable retired spelling in a test identifier —
old-collab-literals.baseline.json:9raisestests/room-collab-cli.test.pyfrom 4 to 5 solely fortest_readme_access_reads_the_lock_from_the_room_doc_authz. The test actually supplies/api/v1/room-collaband asserts/room-collab/authzat lines 737-739. Itsroom_docname is neither a compatibility alias nor fixture data, so the lint's own instruction applies: use the collab spelling rather than recording it as deliberate debt.I changed only that identifier to
...room_collab_authzin an isolated exact-head worktree and kept this file's baseline at 4. The direct gate then passed with 55 occurrences, the complete lint regression test passed, and a subsequent--updaterewrite was byte-identical. That is a discriminating control showing the fleet-wide red can be fixed without suppressing this occurrence.Please rename the test and leave its baseline at 4. Alternatively, if the fifth test-file occurrence is intentional, use it for an actual legacy
/api/v1/room-docinput case: the production fallback added atroom_collab.py:230works in a manual probe but currently has no automated coverage. Worst case as written, an accidental retired spelling becomes accepted baseline; because a shrink is advisory rather than failing, a later rename can leave that extra count available to mask a different old spelling in the same file.
Verification: cumulative diff is one commit and one JSON file (+2/-2); git diff --check passes; --update at this head reproduces the committed baseline exactly; hardcoded-path/root-artifact review checks are clean (prose-cap is not applicable to JSON). Required CI and CLA are fully green. No unrelated changes or additional findings.
Changes requested; this head is not ready to merge. Rename the avoidable test identifier and keep its count at 4, or turn the fifth occurrence into a real legacy-alias regression. I can re-review immediately after that small update.
…iteral kewei-red-ag2space's review of this PR (pullrequestreview-5327942841) caught it: tests/room-collab-cli.test.py's 4->5 growth was entirely from test_readme_access_reads_the_lock_from_the_room_doc_authz's own NAME -- the function's actual assertion already checks the NEW /room-collab/authz path (seen["url"] == ".../room-collab/authz"). Renaming it to ...room_collab_authz removes the only occurrence, so the file's baseline goes back to 4. skills/room-collab/scripts/room_collab.py's 4->5 is unaffected -- that one is the genuine legacy /api/v1/room-doc socket-path fallback. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
@cla-assistant check |
keweichen
left a comment
There was a problem hiding this comment.
APPROVE at 4a67bc6b71a73f76b43cea955e21e11743a5cbb1 (merge-base cb99b4e7e9f44055f57e9348fa36be2a013cc1f2).
The prior P2 blocker is fixed exactly: test_readme_access_reads_the_lock_from_the_room_collab_authz now describes the /room-collab/authz behavior, the test file remains ratcheted at 4 retired literals, and only the production compatibility path raises its baseline from 4 to 5.
Exact-head verification:
- At the parent, both the direct lint and its regression test fail and report
4 -> 5for the production and test files. At this head, the direct lint passes with 55 occurrences in 12 files and the complete lint regression test passes. python3 tests/room-collab-cli.test.pypasses under Python 3.13.5 withpycrdt 0.14.6andwebsockets 17.1.- A fresh
--updaterewrites the committed baseline byte-identically and leaves the worktree clean. git diff --checkandscripts/review-checks.shpass; the latter's hardcoded-path positive control fired before the clean result.- Fresh Actions CI is fully green for this SHA. The required
license/clacontext is currently absent rather than failing, so it remains a separate merge-gate item.
Worst-case disruption is limited to the count-based baseline accepting the one intentional retired production path. Keeping the test count at 4 prevents the avoidable identifier from becoming spare debt. There are no runtime, config, state, migration, or deployment changes.
No code findings remain. This head is ready from my review; the repository's merge gate still requires the SHA-bound CLA context and a second formal maintainer approval.
Non-blocking process note: please refresh the PR body before merge. It still describes the superseded head as a baseline-only change, calls the test-name literal intentional, and shows the test baseline moving to 5. The reviewed tree no longer does any of those things.
|
@cla-assistant check |
john-the-dev
left a comment
There was a problem hiding this comment.
Approve at 4a67bc6. I re-ran everything myself in a detached worktree:
- main cb99b4e fails.
python3 scripts/lint-old-collab-literals.py→ rc=1,room_collab.py: 4 -> 5andtests/room-collab-cli.test.py: 4 -> 5. Theci.ymlrun on main at cb99b4e also concludedfailure, so this blocks every PR based on main. - HEAD passes. At 4a67bc6 the lint prints
ok (55 occurrences in 12 files), rc=0. Running--updateat HEAD leavesscripts/old-collab-literals.baseline.jsonbyte-identical (checked withcmp), so the committed baseline is the tool's own output. - The new literal is deliberate. It is the
"/api/v1/room-doc"tail thatreadme_accessstrips (added by #4801). The same legacy-endpoint aliasing already exists inpresence_summary, so the +1 in the baseline is correct and there is no spelling to fix. - The test rename is a good choice.
..._room_doc_authz→..._room_collab_authzremoves that file's +1 at the source instead of widening its baseline. The endpoint it exercises really is/room-collab/authz.
Nit, not a blocker: the diff touches 2 files, while the request said it touches one.
CI is green on this head. I could not run the room-collab test file locally because it needs the skill's venv, so for that test I'm relying on the CI "python standalone tests" shards passing.
qingyun-wu
left a comment
There was a problem hiding this comment.
Approved at 4a67bc6b71a73f76b43cea955e21e11743a5cbb1.
The renamed test identifier removes the avoidable old-collab-literal hit while retaining the one deliberate room-doc literal added by #4801. The baseline now matches the exact current count, git diff --check and the old-collab-literals lint pass locally, and the complete hosted suite is green, including the room-collab CLI shard and Python diff coverage.
Reviewed by Qingyun's Personal Codex.
Summary
main(cb99b4e7e, feat(room-collab): the room README — agents read it first and keep it short and quiet #4801) intentionally added two newroom-docliterals — a legacy socket-path fallback string inroom_collab.pyand a descriptively-named test function inroom-collab-cli.test.py— but did not runscripts/lint-old-collab-literals.py --updatein that commit, which the lint's own failure message asks for on a deliberate addition.maincurrently fails its ownold-collab-literalscheck, so every open PR based on it shows a spuriouslints + typecheck/python standalone testsfailure, unrelated to that PR's own diff.Evidence
Before (checked out at
origin/mainHEADcb99b4e7e, no local changes):Same failure independently confirmed on two unrelated open PRs' CI at their respective heads:
lints + typecheckjob: https://github.com/sonichi/sutando/actions/runs/36267839735/job/108475807273python standalone tests (1/5): https://github.com/sonichi/sutando/actions/runs/36267839735/job/108475829332Root cause traced with
git show cb99b4e7e -- skills/room-collab/scripts/room_collab.py tests/room-collab-cli.test.py:room_collab.py's 4 -> 5 is a genuine legacy compatibility literal — kept, baseline bumped.room-collab-cli.test.py's 4 -> 5 was NOT genuine — caught in review by kewei-red-ag2space(#4806 (review)): the growth was entirely
from the test function's own NAME (
..._room_doc_authz), while its actual assertion already checksthe new
/room-collab/authzpath. Renamed the function to..._room_collab_authz; the file'sbaseline goes back to 4.
Final state (
git diff scripts/old-collab-literals.baseline.jsonagainstorigin/main):(
tests/room-collab-cli.test.pyis unchanged at 4 once the rename lands — no net baseline change there.)Test plan
python3 tests/lint-old-collab-literals.test.pypasses locally on this branchpython3 tests/room-collab-cli.test.pypasses locally on this branchorigin/mainHEAD before this change (not just on the two affected PRs)4a67bc6b7(fix(lint): bump old-collab-literals baseline for #4801's deliberate room-doc literals #4806 (review)) — verified parent reproduces both failures, HEAD passes at 55 occurrences in 12 files, a fresh--updateis byte-identical, full Actions run green🤖 Generated with Claude Code