Skip to content

fix(lint): bump old-collab-literals baseline for #4801's deliberate room-doc literals - #4806

Merged
sonichi merged 2 commits into
mainfrom
fix/old-collab-literals-baseline-4801
Sep 27, 2026
Merged

sonichi merged 2 commits into
mainfrom
fix/old-collab-literals-baseline-4801

Conversation

@sonichi

@sonichi sonichi commented Sep 26, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • main (cb99b4e7e, feat(room-collab): the room README — agents read it first and keep it short and quiet #4801) intentionally added two new room-doc literals — a legacy socket-path fallback string in room_collab.py and a descriptively-named test function in room-collab-cli.test.py — but did not run scripts/lint-old-collab-literals.py --update in that commit, which the lint's own failure message asks for on a deliberate addition.
  • Result: main currently fails its own old-collab-literals check, so every open PR based on it shows a spurious lints + typecheck / python standalone tests failure, unrelated to that PR's own diff.
  • This PR closes that gap — with one correction along the way (see below).

Evidence

Before (checked out at origin/main HEAD cb99b4e7e, no local changes):

$ python3 tests/lint-old-collab-literals.test.py
...
  FAILthe repo's own baseline is current (run --update if this fails on purpose): old-collab-literals: FAIL — retired spellings grew (baseline -> now):
  skills/room-collab/scripts/room_collab.py: 4 -> 5
  tests/room-collab-cli.test.py: 4 -> 5
lint-old-collab-literals: FAIL (1): the repo's own baseline is current (run --update if this fails on purpose)

Same failure independently confirmed on two unrelated open PRs' CI at their respective heads:

Root cause traced with git show cb99b4e7e -- skills/room-collab/scripts/room_collab.py tests/room-collab-cli.test.py:

+    for tail in ("/api/v1/room-collab", "/api/v1/room-doc"):
...
+def test_readme_access_reads_the_lock_from_the_room_doc_authz():

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 checks
the new /room-collab/authz path. Renamed the function to ..._room_collab_authz; the file's
baseline goes back to 4.

Final state (git diff scripts/old-collab-literals.baseline.json against origin/main):

-  "skills/room-collab/scripts/room_collab.py": 4,
+  "skills/room-collab/scripts/room_collab.py": 5,

(tests/room-collab-cli.test.py is unchanged at 4 once the rename lands — no net baseline change there.)

Test plan

  • python3 tests/lint-old-collab-literals.test.py passes locally on this branch
  • python3 tests/room-collab-cli.test.py passes locally on this branch
  • Confirmed the failure reproduces on origin/main HEAD before this change (not just on the two affected PRs)
  • Reviewed by kewei-red-ag2space: APPROVED at 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 --update is byte-identical, full Actions run green
  • CI green on this PR

🤖 Generated with Claude Code

…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>
@sonichi

sonichi commented Sep 26, 2026

Copy link
Copy Markdown
Owner Author

@qingyun-wu @keweichen — flagging this as urgent-ish: main is currently failing its own old-collab-literals lint gate (#4801 merged as cb99b4e7e added two legitimate room-doc literals — a legacy socket-path fallback and a test function name — without the --update its own commit message would have needed). Confirmed the same spurious lints + typecheck / python standalone tests failure independently on #4580 and #4721 CI, and reproduced it locally at origin/main HEAD with no other changes — so this is affecting every open PR's CI right now, not just those two.

This PR (#4806) is the single missing --update, verified green locally. Requesting review so it can land quickly and stop the fleet-wide false-red.

@github-actions

github-actions Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Coverage Gate

✅ Diff coverage PASSES the 95% bar. Whole-tree (informational): 90%.

Diff Coverage

Diff: origin/main...HEAD, staged and unstaged changes

No lines with coverage information in this diff.

@keweichen keweichen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

  1. [P2] Do not baseline an avoidable retired spelling in a test identifier — old-collab-literals.baseline.json:9 raises tests/room-collab-cli.test.py from 4 to 5 solely for test_readme_access_reads_the_lock_from_the_room_doc_authz. The test actually supplies /api/v1/room-collab and asserts /room-collab/authz at lines 737-739. Its room_doc name 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_authz in 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 --update rewrite 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-doc input case: the production fallback added at room_collab.py:230 works 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>
@github-actions

Copy link
Copy Markdown
Contributor

@cla-assistant check

@keweichen keweichen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 -> 5 for 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.py passes under Python 3.13.5 with pycrdt 0.14.6 and websockets 17.1.
  • A fresh --update rewrites the committed baseline byte-identically and leaves the worktree clean.
  • git diff --check and scripts/review-checks.sh pass; the latter's hardcoded-path positive control fired before the clean result.
  • Fresh Actions CI is fully green for this SHA. The required license/cla context 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.

@sonichi

sonichi commented Sep 26, 2026

Copy link
Copy Markdown
Owner Author

@cla-assistant check

@john-the-dev john-the-dev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 -> 5 and tests/room-collab-cli.test.py: 4 -> 5. The ci.yml run on main at cb99b4e also concluded failure, so this blocks every PR based on main.
  • HEAD passes. At 4a67bc6 the lint prints ok (55 occurrences in 12 files), rc=0. Running --update at HEAD leaves scripts/old-collab-literals.baseline.json byte-identical (checked with cmp), so the committed baseline is the tool's own output.
  • The new literal is deliberate. It is the "/api/v1/room-doc" tail that readme_access strips (added by #4801). The same legacy-endpoint aliasing already exists in presence_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_authz removes 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.

@sonichi sonichi closed this Sep 26, 2026
@sonichi sonichi reopened this Sep 26, 2026
@sonichi sonichi closed this Sep 27, 2026
@sonichi sonichi reopened this Sep 27, 2026

@qingyun-wu qingyun-wu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@sonichi sonichi closed this Sep 27, 2026
@sonichi sonichi reopened this Sep 27, 2026
@sonichi sonichi closed this Sep 27, 2026
@sonichi sonichi reopened this Sep 27, 2026
@sonichi
sonichi merged commit d42a357 into main Sep 27, 2026
152 checks passed
@sonichi
sonichi deleted the fix/old-collab-literals-baseline-4801 branch September 27, 2026 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants