Skip to content

Fix typos in test docstring and comment - #856

Open
jeanluyac-sketch wants to merge 1 commit into
pytest-dev:mainfrom
jeanluyac-sketch:fix-typos-in-tests
Open

jeanluyac-sketch wants to merge 1 commit into
pytest-dev:mainfrom
jeanluyac-sketch:fix-typos-in-tests

Conversation

@jeanluyac-sketch

Copy link
Copy Markdown

Fixes two typos in the tests: "trough" → "through" in a docstring and "bloked/unregistred" → "blocked/unregistered" in a comment. No functional change; the two touched test modules pass.

AI assistance: drafted with Claude; I reviewed the diff myself.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0137jz1XbSeuomn8S7nSE9k6
coe0718 pushed a commit to coe0718/diaktoros that referenced this pull request Dec 5, 2026
…or the model leaves

F1 (valid). The command redacted secrets and then removed control
characters. A secret with an escape character inside it was not
matched by the redactor, and removing the character afterwards
printed it whole. Branch names were not redacted at all.

- _shown() does both for every printed field that is not the
  command's own text, control characters first: the review body, the
  head's ref and base, the partial-view reason, the reviewer's
  description, each preflight name, detail and fix, the failure and
  the sandbox's last output.
- Tests: a token and a model key each split by a control character,
  in the body, in the sandbox's last output and in a preflight
  message; a head and a base branch named after a secret.

F2 (valid, and the promise changes). I had written that the Hermes
home holds nothing it did not hold before, and the test that claimed
to show it replaced profile resolution with a stand-in. Real
resolution takes the profile's lock, which creates
state/diaktoros-seat-locks/<hash>.lock.

I have not made that go away. The file is the cross-process
serialization: every process that resolves the profile opens the
same path and flocks it. Not creating it when it is absent would let
try and a loop refresh one OAuth token at the same time; deleting it
afterwards is unsafe for the same reason, since the other openers do
not re-check the inode. An empty file in Diaktoros's own state
directory is the smaller harm. So the promise is now stated as what
is true:

- The command's own code writes only in its temporary directory.
- Asking for the profile's model takes that lock (created if absent,
  and it stays), and is Hermes running as that profile: it may
  refresh the profile's OAuth token, and it stages a provider-plugin
  copy under runtime/provider-plugins.
- That copy outlives the call because our resolver ends with
  os._exit, which skips Hermes's cleanup. That is older than try and
  happens on every seat turn; filed as #2899.

The module docstring and docs/commands.md say this. Tests:
- The tree test is renamed to say what it shows (the command's own
  code, with the model handed to it).
- RealResolution runs the real resolve_profile, run_resolver and
  profile_lock with only Hermes's process stubbed: the new paths are
  exactly state/, state/diaktoros-seat-locks/ and one empty lock
  file; every earlier file is unchanged; Hermes ran as that profile
  with the lock held; the lock is free afterwards and is not in the
  profile; a second run adds nothing.
- What Hermes writes in its own home cannot be shown with a stubbed
  Hermes. The real run below shows the plugin copy; a token refresh
  was not observed.

The real command, run by the maintainer on his machine at 63aac38
(the commit before this one) with scratch/trycmd.py from the
throwaway trycheck branch. Output, with the path list shortened:

    code: coe0718/diaktoros dk-try-cmd 63aac38
    running: hermes dk try --repo pytest-dev/pluggy --pr 856 --reviewer-profile vex
    ------------------------------------------------------------------------
    hermes dk try: one reviewer turn on pytest-dev/pluggy#856. Nothing is posted; nothing is installed.
      reviewer: profile vex: openai-codex / gpt-6.1-terra via chatgpt.com [codex_responses, OAuth (host-refreshed)]
      running in the sandbox (up to 900s)...

    == the review it would post: REQUEST_CHANGES ==
    F1 [other]: CI check "Timeline protection": P1 (blocks under the CI policy; underlying defect severity is unknown). The host reports this check failed at head b00b61b062d5c6c9116ef03d587a726530206b37. The check is not defined in the exported workflow files, and its logs were not provided, so I cannot identify a source line or establish the cause. Please investigate the failed check and obtain a passing result before merging. Evidence: the supplied CI-at-head record reports `failed: "Timeline protection"` and 19 passed; no CI query command is available in this sandbox.

    Verification: The complete diff changes only a test docstring and a comment (testing/test_details.py:319 and testing/test_pluginmanager.py:526), so no new behavioral test is required. `python -m pip wheel --no-deps --no-build-isolation -w /home/agent/cache/scratch/pluggy-review-wheel .` built a wheel. `PYTHONPATH=/home/agent/cache/scratch/pluggy-review-wheel/pluggy-0.0.0-py3-none-any.whl python -m pytest -q testing/test_details.py testing/test_pluginmanager.py` returned 98 passed; the two specifically touched tests also returned 2 passed. An initial source-path test run had 97 passed and one metadata failure because it read the preinstalled pluggy distribution; the wheel-based run used the reviewed package metadata and passed. The no-isolation build produced version 0.0.0, so it does not verify release versioning.

    CI at this head: 19 checks passed; Timeline protection failed. The provided record does not name the passed checks or describe their coverage.

    Verdict: REQUEST_CHANGES
    Not verified: Timeline protection logs and underlying cause; release-version build; other Python versions and the full suite.
    == end ==

      head b00b61b062d5 (fix-typos-in-tests into main), from a fork
      model tokens: 113,181 in / 1,877 out

    This is one first-look turn of the reviewer, not the loop: no fixer, no adjudicator, no earlier rounds, and the loop's CI gate, findings history and human-path holds were not applied to the verdict.
    Nothing was posted to GitHub and nothing was installed.
    ------------------------------------------------------------------------
    exit status: 0   took 123s
    paths that appeared under /home/jeremy/.hermes during the run: 8357
        /home/jeremy/.hermes/cron/output/a8530160961d/2026-12-05_13-19-04.md
        /home/jeremy/.hermes/runtime/provider-plugins/owned-1ctq5ndx
        (13 more shown, all under that owned-1ctq5ndx directory)
    dk-try* directories left in temp: 0

The script printed OVERALL: NOT OK. Its check was wrong (it counted
any path with "try" in its name) and it also met the plugin copy
above: 8,357 new paths, all but the cron file under one owned-*
directory, which another session on that host traced to the
resolver's process, with its lock unheld. I first attributed it to
the cron job; that was wrong.

--Fable
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.

2 participants