Skip to content
Castellan
Surveyor's icon

Concept · Surveyor

Read as

The Surveyor for developers, your code and tests

With developer features on, the Surveyor also checks your checkouts and worktrees, runs each staff member's own tests once a day in a copy, and finds idle coding sessions and tool servers left running.

Article
2503
Applies to
Surveyor 0.5.4
Last reviewed
For
For developers
Written for Surveyor 0.5.4. Surveyor is at 0.5.24 now (20 small releases since: what changed).

When it shows#

Only while Castellan's developer features are on: when a developer employee is hired. See Hiring, switching and letting staff go.

With them off, the checks below don't run, and the Surveyor speaks in plain words: no log lines, paths, commands, addresses or exit codes, and a fix is a step in words. With them on, each finding carries its evidence as read, and its fix as a PowerShell command to copy. Its page also has a Suggestions tab, and a Heaviest rounds tab, listed by staff member.

Your code#

Each folder under Repository folders (Advanced) that is a git checkout, and each one directly inside it. At first: source\repos, Projects and repos in your user folder.

  • A checkout behind its upstream, with git pull --ff-only to copy when it has nothing of its own.
  • Worktrees whose branch is merged into origin's default branch, or whose folder is gone, with git worktree remove for each clean one, and git worktree prune. One with uncommitted changes is named, not offered.
  • Worktrees whose branch's upstream is gone, as a squash-merged pull request's is, in a note of their own, to check before removing.
  • Reeve's jobs waiting for approval. Where the Steward may approve them, the Surveyor asks it to, and shows the finding only if that fails, with what was tried. reeve jobs approve is offered only where no staff member may approve the job, and the finding says why.

A checkout behind its upstream offers no git pull while Reeve's fast-forward job pulls it, and merged worktrees offer no git worktree remove while Reeve's worktree-tidy job removes them. When that job doesn't run (Reeve off duty, or the job paused), the finding says so and keeps the command.

It never fetches: behind is counted as of git's last fetch, and the evidence says when that was. Merged means merged by ancestry, so a squash-merged branch doesn't count.

Your staff's tests#

Once a day, for Castellan and each staff member with a checkout under your repository folders: its default branch as origin has it is copied out with git archive into the Surveyor's own folder, never run in your checkout, and npm test runs there, for 10 minutes at most. Nothing is fetched or installed.

  • Tests failing: a warning, with the tests that failed and what each threw.
  • A run that passes on the second try: a note that it's flaky, naming the tests.
  • Programs a test run left running: a warning, with Stop-Process to copy. The Surveyor stops nothing.

A commit already tested isn't tested again for a week.

Idle sessions and tool servers#

The PC check also finds idle AI coding sessions, when there are 5 or more, or they hold 1 GB of memory between them, and MCP tool servers left running after the program that started them has exited. It never stops a process, and Castellan's staff are never named.

Its settings for developers#

SettingDefaultWhat it does
Checks: code, testsOnShown only with developer features on.
Repository folders (Advanced)source\repos, Projects, reposEach folder that is a checkout, and each one directly inside.
When to speak up (Advanced)5 sessions, 1 GB, 1 hourIdle sessions and their memory for a warning; the hours of log read for errors.

Is this page right?

If something on it is wrong or out of date, tell us and we'll fix the page.

Still stuck? Write to support@castellan-software.com and mention article 2503. Every version of Surveyor, and what changed in it, is in its release notes.