Skip to content

test(repos): verify Gitea remotes on the homelab #5000

Open

Description

@devops-cli-service

Split from #1090.

Problem: The offline git_fake and MockTransport tests cannot check the live Gitea service, the Cloudflare Access bypass, or the keyring. Why deferred: These checks need #1081 deployed at https://git.<domain>, an unlocked keyring, and a person at a workstation. Acceptance criteria: devops repos gitea connect --context <context> exits 0 and prints the URL, login and version; devops repos remotes exits 0 and every clone lists origin and gitea; a second run prints no created row; GIT_TERMINAL_PROMPT=0 git push -u gitea HEAD:refs/heads/try/remote-check succeeds and the delete succeeds; the largest clone seeds through the tunnel; devops repos sync makes origin/main and gitea/main equal; a worktree on a branch on both remotes succeeds; git push --force gitea HEAD~1:main is refused; the token appears in no config file.

Proposed design

Problem statement

The offline git_fake and MockTransport tests cannot check the live Gitea service, the Cloudflare Access bypass or the keyring. This item records the nine live checks as a runbook that a person repeats at a workstation. It also adds a test that holds the runbook to the generated command matrix. A new issue carries the live run, because no runner pod holds a keyring.

Acceptance criteria

Requirement: Each check in the runbook

The runbook SHALL list each of the nine checks exactly once, with the command to run and the result that shows a pass.

Scenario: Nine checks, one row each

  • WHEN the documentation test reads docs/runbooks/gitea-remotes.md
  • THEN it finds one numbered row for each of the nine checks, and each row holds a command and an expected result.

Requirement: Commands match the command matrix

Each devops command that the runbook names MUST appear in the command matrix of docs/CLI_REFERENCE.md.

Scenario: A command the CLI does not hold

  • WHEN the documentation test finds a devops command in the runbook that the command matrix does not list
  • THEN the test fails and names that command.

Requirement: Preconditions before the first check

The runbook MUST state the preconditions of a run: the service at https://git.<domain>, an unlocked keyring and a person at a workstation.

Scenario: The precondition section

  • WHEN the documentation test reads the section before the first check
  • THEN it finds the service host, the keyring and the workstation named.

Requirement: A failure tells the reader what to check

Each check in the runbook SHALL name what a failure shows, so a person knows what to inspect.

Scenario: A row with a failure note

  • WHEN the documentation test reads each row of the check table
  • THEN each row holds a failure note that is not empty.

Requirement: The docs check passes

The new runbook MUST pass the docs row of Static Analysis.

Scenario: The docs row on the pull request

  • WHEN Static Analysis runs on the pull request that adds the runbook
  • THEN its docs row passes.

Existing Tool Considered

No alternatives check has run on this item. pytest, which pyproject.toml configures as the project's runner, covers the one offline check. The Gitea checks of devops k8s doctor cover the tunnel host, the anonymous refusal, the clone URL and the registry token, but they check the cluster and not a workstation keyring, the remotes or the sync. The change writes one document and one test. Written cost: about 12,000 tokens and about 45 minutes to write, keep and fix that document and test until the test holds the runbook to the command matrix.

Key questions

  • Does the live verification run in CI, or at a workstation?: At a workstation. The test floor refuses a connection to an external host and a lookup of an external DNS name, so no CI job reaches the homelab Gitea. (best practice) [sources: docs/TESTING.md:262]
    • Rejected: A live pytest module in the gate suite. The test floor refuses a connection to an external host and an external DNS lookup, and a runner pod holds no keyring.
    • Chosen: A runbook that a person runs, with an offline documentation test. It keeps CI offline, and the documentation test keeps the procedure true to the command matrix.
  • Which command does the runbook use to prove the connection to the live Gitea?: The runbook names the devops repos command that the command matrix holds, and the documentation test keeps the two in step. The issue's devops repos gitea connect is not in the repository map, so the test decides the name and not the prose. (best practice) [sources: docs/CLI_REFERENCE.md, tests/commands/test_repos.py]
    • Rejected: Copy devops repos gitea connect from the issue. The repository map shows the devops repos commands in tests/commands/test_repos.py and no gitea connect subcommand, so a wrong name stops the first check.
    • Chosen: Take the command from the generated command matrix. docs/CLI_REFERENCE.md holds the command matrix, and the documentation test fails on a name that it does not hold.
  • Where does the runbook live?: docs/runbooks/gitea-remotes.md, beside docs/roadmap/job-success.md, and the docs row of Static Analysis checks it. (best practice) [sources: docs/roadmap/job-success.md, CONTEXT.md]
    • Rejected: A new top-level docs/GITEA_REMOTES.md. The docs folder groups its topic documents in subfolders such as docs/roadmap/, so a runbook belongs in its own folder.
    • Chosen: docs/runbooks/gitea-remotes.md. It follows the subfolder pattern and gives later runbooks one place.
  • Does this item depend on feat(k8s): the homelab runs gitea under argo cd as a read-write internal forge, served in-cluster over http and to workstations at https://git.<domain> through the cloudflare tunnel, with its admin secret pushed from the keyring #1081?: No. The changelog records that feat(k8s): the homelab runs gitea under argo cd as a read-write internal forge, served in-cluster over http and to workstations at https://git.<domain> through the cloudflare tunnel, with its admin secret pushed from the keyring #1081 is closed: the homelab runs Gitea under Argo CD and serves it at https://git.<domain> through the Cloudflare tunnel. [sources: CHANGELOG.md:3634]
  • How does a person unlock the keyring for the run?: The person unlocks the workstation keyring before the first check. No test reads the keyring, because the test floor denies it to every test. (best practice) [sources: docs/TESTING.md:262, tests/support/fakes/keyring.py]
    • Rejected: A keyring fake in the runbook's test. A fake keyring proves nothing about the live token.
    • Chosen: The real workstation keyring, unlocked by a person. The floor denies the keyring to tests, so only a person at the workstation reads the live token.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    source/agent
    type/test
    scope/repos
    status/new
    value/medium
    effort/medium
    on Nov 12, 2026
  2. devops-cli-service commented on Nov 12, 2026

    @devops-cli-service
    ContributorAuthor
  3. devops-cli-service commented on Nov 16, 2026

    @devops-cli-service
    ContributorAuthor

    Waiting for the alternatives check to run. The next refine round looks at the item again after the check records a verdict.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p2-mediumscope/repossource/agentstatus/newtype/testvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions