Skip to content

fix(repo): a bare root-level name is not a run of the arm's file - #186

Merged
antonwolfy merged 3 commits into
intel:mainfrom
napetrov:fix/uptake-bare-root-name
Oct 23, 2026
Merged

antonwolfy merged 3 commits into
intel:mainfrom
napetrov:fix/uptake-bare-root-name

Conversation

@napetrov

Copy link
Copy Markdown
Contributor

Follow-up to #153 (#41 D4); answers the review question on uptake.py:109 that was still open when #153 merged.

Summary

A bare name at the start of a command counted as a run of the arm's root-level file. It resolves through PATH, and the workspace is not on PATH, so it does not run that file.

 root-level added file "lint", command text:
   ./lint x            -> counted
   /eval/run/workspace/lint -> counted
   sh lint             -> counted
-  lint x              -> counted
-  cd d && lint        -> counted
+  lint x              -> not counted
+  cd d && lint        -> not counted

Evidence

  • tests/test_repo_uptake.py: lint x, cd d && lint and bare run move to the no-match cases; 40 passed. ruff clean.
  • Not covered: cd d && ./lint still counts; the matcher does not follow cd (same limit as the nested-path rule).

Merge Danger

Door: two-way

Blast Radius: small. Only uptake.commands of patch: cells whose arm adds a root-level file; a count can drop.

🤖 Generated with Claude Code

A bare `lint` resolves through PATH, not to the workspace file, so the
first word of a command counts only as ./lint, under the workspace path or
after an interpreter. Answers the review question on uptake.py:109.

Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
@codecov-commenter

codecov-commenter commented Oct 22, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.68%. Comparing base (565f653) to head (def5208).
⚠️ Report is 1 commits behind head on main.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #186   +/-   ##
=======================================
  Coverage   91.67%   91.68%           
=======================================
  Files         223      223           
  Lines       27505    27520   +15     
  Branches     4525     4530    +5     
=======================================
+ Hits        25216    25231   +15     
  Misses       1620     1620           
  Partials      669      669           
Files with missing lines Coverage Δ
dokimi/dokimi/repos/uptake.py 93.33% <100.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@xaleryb

xaleryb commented Oct 23, 2026

Copy link
Copy Markdown
Contributor
  • Ran: main and head each on 36 command strings through arm_uptake, the new tests against the pre-fix uptake.py, a mutation pass on the new regex, and the full suite, ruff, mypy and bandit at the head.
  • Only lint and lint x change (1 -> 0). The other 34 inputs give the same result on main and head, the negatives included (./lint.sh, a/lint, ../lint). cd d && ./lint still counts, as the description says.
  • The new test cases fail on the pre-fix source and pass at the head.
  • The open question from feat(repo): record whether the agent used what a patch: arm added (#41 D4) #153 (lint x / cd d && lint) is answered: both are 0 at the head.
  • The only failure is the Tests jobs, all in test_growth_ratchet. It comes from the base and is fixed on main by ci(growth): take #153's growth into the baseline; name the PR behind each post-#93 entry #183, so this needs a rebase or CI re-run before merge.
  • Nothing is left for the author beyond that re-run.

@antonwolfy antonwolfy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. The fix is right: a bare root-level name no longer counts, and ./name, the workspace path and the interpreter forms still do. One nit on the regex.

What I ran, on a Linux review host at a20a1ff:

  • make ci-local: 27 passed, 2 failed, 7 skipped; 7246 tests, total coverage 93%.
  • The two failures are not the PR's. test_growth_ratchet reports dokimi/repos/compare.py::_provenance_warnings: 11 complexity is over the 10 cap, and the PR does not touch compare.py. pip-audit fails on the lock files, which the PR does not touch.
  • Base and head regexes compared on about 70 command strings. Only bare-name forms (lint, lint x, x | lint, (lint), cd d && lint) change from counted to not counted. Names with a / behave the same on both.
  • Mutation: restoring (?:\./)? in the new pattern fails 3 of the new test cases; restoring it in only one of the two branches fails 1 or 2.

Checked, no issues

  • Docs: no other doc or docstring still says "first in a command"; the contract line and the module docstring match the new behaviour.
  • Changelog: the fragment is in the right directory and follows the fragment format.

Comment thread dokimi/dokimi/repos/uptake.py Outdated
Signed-off-by: Alexander Rybkin <alexander.rybkin@intel.com>

@antonwolfy antonwolfy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. The fix is right, and the merge with main cleared the test_growth_ratchet failure that the earlier head had. The one nit from my earlier review is still open.

What I ran, on a Linux review host at 2011ba3:

  • make ci-local: 29 passed, 0 failed, 7 skipped. tests/test_repo_uptake.py passes.
  • Base and head patterns compared on 73 command strings and 5 file sets. All 79 differing results go from counted to not counted, and every one is a bare root-level name as the first word of a command or of a ;, &&, | or ( part. ./lint, the workspace path, sh lint, python3 lint, x;./lint, x|./lint, $(./lint) and names with a / give the same result as the base.

Still open from my earlier review:

  • dokimi/dokimi/repos/uptake.py:109: the [;&|(]\s*\./ alternative is still in the pattern. Removing it changes no result on the 73 strings, so it is dead code, and the x | lint, (lint), ;lint no-match cases are still not in the test.

Checked, no issues

  • Docs: the contract line and the module and function docstrings match the new rule. No other doc still says "first word of a command".
  • Changelog: the fragment follows the format in changelog.d/README.md.
  • Repo rules: no schema, nav or generated-file change; the tests use synthetic events and run offline.

Signed-off-by: Anton Volkov <antonwolfy@gmail.com>

@antonwolfy antonwolfy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. I pushed a commit per nit, up to def5208, which fix the nit from my review:

  • def5208: dokimi/dokimi/repos/uptake.py:109: removed the dead [;&|(]\s*\./ alternative and added x | lint, (lint) and ;lint to the no-match test cases.

make ci-local at def5208: 29 passed, 0 failed, 7 skipped.

@antonwolfy
antonwolfy merged commit 1a9dd69 into intel:main Oct 23, 2026
28 checks passed
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