Skip to content

test(openspec): check that the monitoring-collectors spec names no node #6495

Open

Description

@devops-cli-service

Update 2026-11-26 (infra move): the monitoring values that this spec describes are in dan-petty/homelab.


Split from #5339.

ProblemThe monitoring-collectors spec must name no node. The acceptance of #5339 checks this once with git grep -n hawk -- openspec/specs/monitoring-collectors/. No check guards the spec against a new node name.### Why deferredThe repository holds no list of node names. openspec/config.yaml forbids writing an internal hostname and asks for roles such as <storage-node>. The node names live in dan-petty/homelab, not in this repository. A check for hawk alone covers one name. #5339 defers the general check.### Acceptance criteria- A check fails when the text of openspec/specs/monitoring-collectors/spec.md holds a node name from a named source.- The check names its source of node names, or its rule that defines a node name.- The check passes on the spec after #5339.- uv run devops openspec check passes.

Proposed design

Problem statement

The monitoring-collectors capability left devops-cli in #7290: openspec/specs/monitoring-collectors/ does not exist at this commit, its requirements are a REMOVED delta, and the monitoring values now live in dan-petty/homelab. The guard the issue asks for still has no check here, while AGENTS.md and SECURITY.md forbid an internal hostname or a machine name in any committed file. This item adds a rule that defines a node name and extends tests/invariants/test_living_specs.py so that a node name in any living spec under openspec/specs/ fails the test.

Acceptance criteria

Requirement: A bare word after the node is a node name

The check SHALL report a node name when a bare lowercase word of 3 or more characters follows the node in the text it reads, with a pair of backticks around the word removed.

Scenario: A sample text names the node hawk

  • WHEN uv run devops ci test tests/invariants/test_living_specs.py runs the rule over The alloy-profiles pod does not run on the node hawk. and over the same sentence with hawk in backticks
  • THEN The rule reports hawk for both samples and the command exits 0.

Requirement: A role and the field name are no node name

The check MUST report no node name when the word after the node is a role in angle brackets or the word name.

Scenario: A sample text names the role storage-node and the field name

  • WHEN uv run devops ci test tests/invariants/test_living_specs.py runs the rule over The pod does not run on the node <storage-node>. and over the FNV-32a hash of the node name
  • THEN The rule reports no name for either sample and the command exits 0.

Requirement: The message names the rule

The check MUST name the rule the node <name>, the path and the line of the finding in the message that a node name raises.

Scenario: A failure names the rule

  • WHEN uv run devops ci test tests/invariants/test_living_specs.py builds the message for a sample file that names hawk on its second line
  • THEN The message holds the node <name>, hawk, the sample path and :2, and the command exits 0.

Requirement: Every living spec names no node

The check SHALL report no node name in the text of any spec.md under openspec/specs/.

Scenario: The living specs pass the check

  • WHEN uv run devops ci test tests/invariants/test_living_specs.py runs the test over openspec/specs/ at this commit, which holds no monitoring-collectors capability
  • THEN The test reports no node name and the command exits 0.

Requirement: The OpenSpec validation passes

The change MUST keep uv run devops openspec check passing.

Scenario: The OpenSpec validation passes

  • WHEN uv run devops openspec check runs
  • THEN The command exits 0.

Existing Tool Considered

No alternatives check has run. pytest (MIT) is the open, maintained tool that this repository already uses, and uv run devops ci test runs it. pytest covers the run, the report and the exit code. It lacks the definition of a node name, and the openspec CLI validates the structure of a spec, not its prose. The change adds one rule function and five cases to the existing module tests/invariants/test_living_specs.py, about 40 lines: about 1,200 tokens to build, about 300 tokens a year to keep and fix, and about 45 minutes. Vale (MIT) also covers a prose rule, but it needs a binary, a config file and a CI row for one regular expression, and its rule needs the same definition of a node name.

Key questions

  • Which text does the check read, now that openspec/specs/monitoring-collectors/ is gone?: Every spec.md under openspec/specs/, flat or nested, which is the set that tests/invariants/test_living_specs.py already walks. refactor(k8s): delete the environment files from devops-cli #7290 removed the monitoring-collectors capability from this repository, so the test names no capability: an absent capability raises no finding, and the same rule covers a living spec that returns. (best practice) [sources: openspec/changes/archive/2026-11-26-7290-delete-environment/specs/monitoring-collectors/spec.md:1, docs/HOMELAB_REPO_SWITCH.md:301, tests/invariants/test_living_specs.py:34]
    • Chosen: Every living spec under openspec/specs/. The capability this issue named is gone, the rule of AGENTS.md and SECURITY.md holds for every committed file, and the walk over the specs already exists.
    • Rejected: The path openspec/specs/monitoring-collectors/spec.md. refactor(k8s): delete the environment files from devops-cli #7290 removed the capability, so the path is absent: a test over it fails on a missing file or guards nothing.
    • Rejected: A path list of the specs that name a node. A list goes stale and adds a second place to edit; the walk over openspec/specs/ covers a new capability with no edit.
  • Which source of node names does the check use?: A rule, not a list. A node name is a bare lowercase word of 3 or more characters after the node , with a pair of backticks around it removed; a role in angle brackets such as <storage-node> and the field word name are no node name. The name exception is needed because a living spec says the node name of the Node object. The test reaches no network and no infra repository checkout. (best practice) [sources: AGENTS.md:16, SECURITY.md:29, openspec/specs/argo-workflow-logs/spec.md:13]
    • Chosen: A rule that defines a node name. It needs no list of hosts, it works offline, and it catches a new name in any living spec.
    • Rejected: A list of node names in the test. AGENTS.md rule 10 and SECURITY.md item 8 forbid an internal hostname or a machine name in this public repository, and a list goes stale.
    • Rejected: Read the names from dan-petty/homelab at run time. A test here reaches no network and CI holds no infra repository checkout, so the rule is the only source that works offline.
  • Where does the check live?: In tests/invariants/test_living_specs.py, the invariant file of the living specs, which already reads each spec.md under openspec/specs/. uv run devops ci test tests/invariants/test_living_specs.py runs it, and the required check Tests & Coverage reads that run. (best practice) [sources: docs/TESTING.md:99, docs/TESTING.md:95, tests/invariants/test_living_specs.py:25, docs/adr/0004-ci-is-the-authoritative-gate.md:11]
    • Chosen: Extend tests/invariants/test_living_specs.py. docs/TESTING.md puts each invariant in its subject's file, and this module already walks every living spec.
    • Rejected: A new module tests/openspec/test_specs_no_node_names.py. tests/ mirrors src/devops_cli, so tests/openspec/ holds tests of src/devops_cli/openspec/; a test of spec text there is the parallel file that docs/TESTING.md:99 refuses, named after the work, which docs/TESTING.md:98 refuses.
    • Rejected: Extend tests/invariants/test_committed_addresses.py. Its subject is addresses and .lan hosts (SECURITY.md:29); a machine name is another rule, and it reads each tracked file, where the archive holds node names legitimately.
    • Rejected: A rule inside uv run devops openspec check. It changes the output of a devops command, so it needs product code and a spec delta, for a rule about the spec text.
    • Rejected: A vale rule. It adds a binary, a config file and a CI row for one regular expression, and the same rule definition.
  • Does the item wait on docs(openspec): name no node in the monitoring-collectors spec #5339?: No. docs(openspec): name no node in the monitoring-collectors spec #5339 removed the hawk line from a capability that no longer exists here: refactor(k8s): delete the environment files from devops-cli #7290 made monitoring-collectors a REMOVED capability, openspec/specs/monitoring-collectors/ is absent at this commit, and no living spec holds a node name, so the check passes on the tree as it stands and waits on no other item. [sources: openspec/changes/archive/2026-11-26-7290-delete-environment/specs/monitoring-collectors/spec.md:1, docs/HOMELAB_REPO_SWITCH.md:301, tests/invariants/test_living_specs.py:34]
  • Which command proves that the check gates a merge?: uv run devops ci test runs each test under tests/, and ADR 0004 makes Tests & Coverage a required check of the main ruleset, so a failing test blocks a merge. [sources: docs/adr/0004-ci-is-the-authoritative-gate.md:11, docs/adr/0004-ci-is-the-authoritative-gate.md:23, docs/adr/0004-ci-is-the-authoritative-gate.md:29]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    type/test
    source/agent
    status/new
    on Nov 20, 2026
  2. devops-cli-service commented on Nov 20, 2026

    @devops-cli-service
    ContributorAuthor
  3. added
    value/medium
    effort/low
    scope/openspec
    priority/p2-medium
    on Nov 20, 2026
  4. devops-cli-service commented on Nov 20, 2026

    @devops-cli-service
    ContributorAuthor

    Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies and Watched files in the section Proposed design of the body.

  5. devops-cli-service commented on Nov 27, 2026

    @devops-cli-service
    ContributorAuthor

    Next step: the alternatives check records a verdict. See the section Proposed design of the body.

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/lowpriority/p2-mediumscope/openspecsource/agentstatus/newtype/testvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions