Skip to content

fix(tools/fossil, tools/vcs): detect Fossil checkouts by .fslckout - #1494

Merged
potiuk merged 1 commit into
apache:mainfrom
dpol1:fix/fossil-checkout-marker
Oct 3, 2026
Merged

potiuk merged 1 commit into
apache:mainfrom
dpol1:fix/fossil-checkout-marker

Conversation

@dpol1

@dpol1 dpol1 commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • tools/vcs (FossilBackend.detect()) and tools/fossil (find_repo_db()) looked for a checkout file named .fslckg. Fossil never writes that name: its glossary says the checkout database "is in the .fslckout file on POSIX type systems, but for historical compatibility reasons, it's called _FOSSIL_ by native Windows builds of Fossil."
  • On Linux and macOS a Fossil checkout therefore was not detected by tools/vcs, and the Fossil bridge could not resolve the repository from the checkout. Native Windows checkouts matched through _FOSSIL_ and are unchanged.
  • The vcs test fixture created the same misspelled file, so the suite passed. It now creates .fslckout, and a new test resolves the repository through a .fslckout database.

Type of change

  • Skill change (.claude/skills/<name>/) — eval fixtures updated below
  • Tool / bridge contract (tools/<system>/*.md)
  • Python package (tools/*/ with pyproject.toml)
  • Groovy reference impl
  • Cross-cutting (RFC, AGENTS.md, sandbox, privacy-LLM)
  • Documentation (docs/, README.md, CONTRIBUTING.md)
  • Project template (projects/_template/)
  • CI / dev loop (prek, workflows, validators)
  • Other: one-line marker-name fix in tools/fossil/README.md

Test plan

  • prek run --all-files passes
  • For Python packages touched: uv run pytest / ruff check / mypy passes (tools/fossil: 28 passed; tools/vcs: 21 passed)
  • For Groovy bridges touched: command-line invocation tested end-to-end
  • For skill changes: eval suite passes for the affected skill
  • For skill behaviour changes: a new or updated eval fixture is included in this PR
  • Other: both tests were run before the fix and failed (test_detect_marks_hg_svn_fossil with the corrected fixture, and the new test_find_repo_db_reads_fslckout), then pass with it.

RFC-AI-0004 compliance

No principle touched: the change renames a file marker and its test fixture.

Linked issues

None. Filed as a direct PR because the fix is a two-line rename plus tests.

Notes for reviewers (optional)

The tests use a hand-built .fslckout file and SQLite database rather than a real fossil open, as the existing fixture does. A test against the real binary (skipped when fossil is not installed, like the Mercurial tests) would check the marker against Fossil itself; I left it out to keep this PR to the rename.

Fossil names its checkout database `.fslckout` on POSIX systems and
`_FOSSIL_` on native Windows builds. Both checkout probes looked for
`.fslckg`, a name Fossil never writes, so `tools/vcs` did not detect a
Fossil checkout on Linux or macOS, and the Fossil bridge could not
resolve the repository database from one. The vcs test fixture used
the same misspelled name, so the suite passed.

Adds a test that resolves the repository through a `.fslckout`
database, and corrects the marker name in the Fossil README.

Signed-off-by: Davide Polato <dpol1@apache.org>
@github-actions github-actions Bot added contract:tracker Tool capability: issue / board / label backend contract:source-control Tool capability: branch / commit / diff / push (VCS) labels Oct 2, 2026

@potiuk potiuk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Correct, complete fix: every .fslckg probe in the tree now looks for Fossil's real POSIX checkout database .fslckout, and the corrected fixture plus the new find_repo_db test cover both code paths.

The new test resolves from a nested sub/ directory, so it pins the parent walk as well as the marker name. A follow-up test against a real fossil open (skipped when the binary is absent, like the Mercurial tests) would tie the marker to Fossil itself, as you noted — not needed for this PR.


This review was drafted by an AI-assisted tool and
confirmed by an Apache Magpie maintainer. The maintainer
approving this PR has read the findings and signed off. If
something feels off, please reply on the PR and a maintainer
will follow up.

More on how Apache Magpie handles maintainer review:
CONTRIBUTING.md.

@potiuk
potiuk merged commit 3dd370e into apache:main Oct 3, 2026
10 checks passed
@dpol1
dpol1 deleted the fix/fossil-checkout-marker branch October 3, 2026 19:47
@potiuk potiuk added family:docs Docs, MISSION.md, READMEs family:tools tools/* labels Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contract:source-control Tool capability: branch / commit / diff / push (VCS) contract:tracker Tool capability: issue / board / label backend family:docs Docs, MISSION.md, READMEs family:tools tools/*

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants