docs(agents): make issue-tracker.md tool-neutral and name tea as the supported tool
issue-tracker.md becomes Conventions (operations as Gitea concepts) and a Tool section with one tea command per operation, tea api for blocked_by dependencies. It names no skill or MCP tool, and drops the maintainer-only token and account-lookup lines. setup.md adds The tracker: install tea 0.14.2 or later and log in with a token of your own account. dev-setup.sh warns when tea is missing or older; it installs nothing. Closes #267 Assisted-by: Claude Code
This commit is contained in:
1 parent
789b481b5d
commit
abde765472
4 files changed
+138
-13
No files matched your search
@@ -139,6 +139,39 @@ class DevSetupTest(unittest.TestCase):
|
||||
check=False,
|
||||
)
|
||||
|
||||
def path_without_tea(self) -> str:
|
||||
"""The test PATH with every directory that holds a tea replaced by a copy without it.
|
||||
|
||||
Dropping the directory would also drop git and the shell tools a distribution installs
|
||||
next to its tea package.
|
||||
"""
|
||||
dirs = []
|
||||
for i, d in enumerate(self.env["PATH"].split(os.pathsep)):
|
||||
if not os.access(os.path.join(d, "tea"), os.X_OK):
|
||||
dirs.append(d)
|
||||
continue
|
||||
farm = self.tmp / f"no-tea-{i}"
|
||||
farm.mkdir(exist_ok=True)
|
||||
for entry in os.listdir(d):
|
||||
if entry != "tea" and not (farm / entry).exists():
|
||||
(farm / entry).symlink_to(os.path.join(d, entry))
|
||||
dirs.append(str(farm))
|
||||
return os.pathsep.join(dirs)
|
||||
|
||||
def path_with_tea(self, version_line: str) -> str:
|
||||
"""The test PATH with a tea stub first whose `--version` prints `version_line`."""
|
||||
bin_dir = self.tmp / "tea-bin"
|
||||
bin_dir.mkdir(exist_ok=True)
|
||||
tea = bin_dir / "tea"
|
||||
tea.write_text(f"#!/bin/sh\nprintf '{version_line}\\n'\n")
|
||||
tea.chmod(0o755)
|
||||
return f"{bin_dir}{os.pathsep}{self.env['PATH']}"
|
||||
|
||||
@staticmethod
|
||||
def tea_0_16_line(version: str) -> str:
|
||||
"""The first line of `tea --version` as tea 0.16.0 prints it, number in ANSI bold."""
|
||||
return f"Version: \\033[1m{version}\\033[0m\\tgolang: 1.26.6\\tgo-sdk: v1.2.0"
|
||||
|
||||
def hooks_z(self, repo: Path) -> bytes:
|
||||
return self.git(
|
||||
repo, "config", "--local", "-z", "--get-all", "core.hooksPath", check=False
|
||||
@@ -196,6 +229,40 @@ class DevSetupTest(unittest.TestCase):
|
||||
self.assertIn("# kamino-dev-setup: virtualenv first on PATH", text)
|
||||
self.assertEqual(self.hooks_z(repo), b"")
|
||||
|
||||
def test_a_missing_tea_warns_and_setup_succeeds(self) -> None:
|
||||
repo = self.make_repo()
|
||||
proc = self.run_setup(repo, PATH=self.path_without_tea())
|
||||
self.assertEqual(proc.returncode, 0, proc.stderr)
|
||||
self.assertIn("warning: tea 0.14.2 or later is not on PATH", proc.stderr)
|
||||
|
||||
def test_a_tea_older_than_0_14_2_warns_and_setup_succeeds(self) -> None:
|
||||
repo = self.make_repo()
|
||||
for old in ("0.14.1", "0.9.2"):
|
||||
with self.subTest(old=old):
|
||||
proc = self.run_setup(
|
||||
repo, PATH=self.path_with_tea(self.tea_0_16_line(old))
|
||||
)
|
||||
self.assertEqual(proc.returncode, 0, proc.stderr)
|
||||
self.assertIn(f"warning: tea {old} is older than 0.14.2", proc.stderr)
|
||||
|
||||
def test_a_tea_of_0_14_2_or_later_gives_no_warning(self) -> None:
|
||||
repo = self.make_repo()
|
||||
for ok in ("0.14.2", "0.16.0", "1.0.0"):
|
||||
with self.subTest(ok=ok):
|
||||
proc = self.run_setup(
|
||||
repo, PATH=self.path_with_tea(self.tea_0_16_line(ok))
|
||||
)
|
||||
self.assertEqual(proc.returncode, 0, proc.stderr)
|
||||
self.assertNotIn("warning: tea", proc.stderr)
|
||||
|
||||
def test_an_unreadable_tea_version_warns_and_setup_succeeds(self) -> None:
|
||||
repo = self.make_repo()
|
||||
# A dev build: the version is not numeric, and the golang version must not stand in for it.
|
||||
line = "Version: main-dev\\tgolang: 1.26.6\\tgo-sdk: v1.2.0"
|
||||
proc = self.run_setup(repo, PATH=self.path_with_tea(line))
|
||||
self.assertEqual(proc.returncode, 0, proc.stderr)
|
||||
self.assertIn("warning: could not read the version of tea", proc.stderr)
|
||||
|
||||
def test_tools_are_installed_from_the_hashed_lock_with_its_pins(self) -> None:
|
||||
repo = self.make_repo()
|
||||
self.assertEqual(self.run_setup(repo).returncode, 0)
|
||||
|
||||
Reference in new issue
Block a user