Skip to content

fix(public-tree): no setup-mode preamble or internal MCP service in the tree, and a guard - #35

Merged
dinndev2 merged 4 commits into
mainfrom
fix/public-tree
Nov 15, 2026
Merged

dinndev2 merged 4 commits into
mainfrom
fix/public-tree

Conversation

@dinndev2

@dinndev2 dinndev2 commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Closes #34.

What changes

  • 6 files lose the setup-mode preamble (.env.example, .githooks/pre-commit, bin/dev, bin/stop, and two .dz/ files): each now says it is owned by this repository's maintainers.
  • .mcp.json: our own MCP service removed; codegraph stays. Scorecard: the platform run id line is gone.
  • bin/check-public-tree (new; bash, no dependencies), run as a "Public tree" step in the CI lint job, which runs on every PR, from the repository root. It is not a bin/check stage, because CheckTest/CheckScriptTest pin bin/check's exact stage list. It reads git ls-files, proves it read itself, and fails on an internal host on our domain, a private repository or bare private tracker reference, someone's home directory, the setup mode's name, or a private word. A CODEOWNERS @org/team is not a repository. A failure names the file and the rule, never the value.
  • The guard also checks each tracked path, counts raw.githubusercontent.com and api.github.com/repos references as repository references, and prints a fix: line on every failure.
  • --self-test proves each rule fires, including on a 200 KB file with the match on line 1 (no SIGPIPE false pass under pipefail). It also pins CI's exact env lines: commenting one out or weakening the condition fails it.
  • Private words come from the PUBLIC_TREE_PRIVATE_WORDS secret, never from the tree (fragments joined in a public file are the word: db-mcp-gateway#350). The workflow step passes it and sets PUBLIC_TREE_PRIVATE_WORDS_REQUIRED=1 on this repository's own runs; forks and Dependabot skip with a notice. The secret is set.

Verification

Run Result
bin/check-public-tree --self-test every rule fires
guard, two private words, required read 344 of 366 tracked files, 2 private words (the rest are binary), green
the same guard on main's tree 7 findings: the 6 preamble files and .mcp.json
actionlint clean

The values are deliberately not repeated here.

🤖 Generated with Claude Code

…he tree, and a guard

Six script and config files carried a preamble naming the internal setup
mode; each now says it is owned by this repository's maintainers.
.mcp.json no longer names our own MCP service, and the scorecard drops
its platform run id.

bin/check-public-tree (bash) guards the tree, as a "Public tree" step in
the lint job and a bin/check stage: no internal host on our domain, no
private repository or bare private tracker reference, no one's home
directory, no setup-mode name, and none of the private words, which come
from the PUBLIC_TREE_PRIVATE_WORDS CI secret, never from the tree.
--self-test proves each rule fires and pins the workflow's exact wiring.

Closes #34

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`sed | grep -q` under pipefail fails falsely when grep matches before sed
has written the rest of a large workflow file (found on magik's). The pin
now greps a here-string, like every other check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@developerz-ai

developerz-ai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Fix failing CI on #35

Queued — waiting for a free box.


🤖 developerz.ai, an automated agent, not a human — developerz-ai[bot]

…s); guard catches up

bin/check's stage list is pinned by CheckTest/CheckScriptTest, so the
guard stays a step of the lint job only, which runs on every PR. The
guard gains what review on magik#32 found: raw.githubusercontent.com and
api.github.com/repos references, tracked paths checked like content, and
fix: lines on every failure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@developerz-ai

developerz-ai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

✅ Reviewed — nothing blocking

0 actionable comment(s) · grounded on your code

⚠️ 1 config note(s): test files were not shown to the reviewer — this diff touched no path recognised as a test, so no assertion was available to read the change against

🤖 developerz.ai — automated review, running on your model and your box.

@developerz-ai developerz-ai Bot 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.

Review summary — 9 file(s), 1 finding(s).

Critical 0 · Major 0 · Minor 1 · Nit 0

Removes setup-mode preambles and the internal MCP server from tracked files, and adds a bash CI guard (with a self-test) that scans tracked files for private hosts, repos, home dirs and secret-supplied words.

1 finding(s) outside this pull request's change (reported, not holding the merge)
  • .env.example:4 minor · docs This PR removes the developerz server from .mcp.json, so this comment is now wrong: nothing in the tree reads DEVELOPERZ_API_KEY any more. Delete the comment and the variable, or reword the comment to say it is unused.

These sit on code this pull request did not change, so they do not hold the merge.

  • test files were not shown to the reviewer — this diff touched no path recognised as a test, so no assertion was available to read the change against

🤖 developerz.ai review — automated, running on your model and your box. What is this?

Comment thread bin/check-public-tree Resolved
@developerz-ai

developerz-ai Bot commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

CI green, ready to merge.

🤖 Posted by developerz.ai — an automated agent, not a human.

…e guard

Review on #35: with our MCP service gone from .mcp.json, nothing reads
DEVELOPERZ_API_KEY, so .env.example no longer lists it. The guard compares
resolved paths (`pwd -P`), so a checkout under a symlinked directory
is not mistaken for another tree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dinndev2

Copy link
Copy Markdown
Contributor Author

Both fixed in 05a4de5: .env.example no longer lists DEVELOPERZ_API_KEY (nothing reads it now), and the guard resolves its root with pwd -P, so a checkout under a symlinked directory isn't mistaken for another tree. Self-test and the tree scan stay green.

@developerz-ai developerz-ai Bot 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.

Review summary — 2 file(s), 0 finding(s).

This increment drops the dormant DEVELOPERZ_API_KEY from .env.example and makes bin/check-public-tree resolve its repo root with pwd -P, which fixes the symlinked-checkout false failure flagged earlier. Low risk.

  • test files were not shown to the reviewer — this diff touched no path recognised as a test, so no assertion was available to read the change against

🤖 developerz.ai review — automated, running on your model and your box. What is this?

@developerz-ai

developerz-ai Bot commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

CI passed, but approval from a reviewer is required before this merge can proceed. Once approved, the platform's merge gate will handle merging.

🤖 Posted by developerz.ai — an automated agent, not a human.

@dinndev2
dinndev2 merged commit 9ebed7c into main Nov 15, 2026
10 checks passed
@dinndev2
dinndev2 deleted the fix/public-tree branch November 15, 2026 16:59
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.

Before listing: tracked files carry facts about our own infrastructure

1 participant