Skip to content

fun facts

bondiano edited this page Nov 12, 2026 · 1 revision

Sych details worth noticing

Several small implementation choices reveal how Sych treats its own output and inputs. These four facts are grounded in the documented 2026-11-12 revision, not inferred project folklore. See Lore for the dated changes and By the numbers for measured repository shape.

The reviewer is not allowed to grade its own proposed replacement

Sych reviews pull requests to its own repository, but self-review is tied to a trusted reviewer build. crates/sych-app/src/server/build.rs refuses a self-review connection when its configured reviewer_commit differs from crate::BUILD_COMMIT; AGENTS.md additionally describes production's image-digest pin outside the repository.

scripts/wait-sych rereads the pull-request head on every polling round and accepts a matching summary rather than just any old bot comment. It also labels inline comments originally posted on earlier heads. The pin and the head check address different questions: which reviewer ran, and which revision its report describes.

An empty line has its own Rust crate

crates/sych-style/src/lib.rs implements blank-line-after-if: an if statement followed by another statement in the same block must have a blank line after it. The check walks a syn syntax tree, so expression-position if, final statements and else chains are not treated like arbitrary text matches.

The same crate can insert the missing lines. justfile wires checking into the lint workflow and exposes style-fix; the rule is also described in Patterns and conventions. This is a narrow local convention, not a claim that rustfmt or Clippy generally fail to format Rust.

Some dangerous-looking code is there to catch the reviewer

eval/bench/plants/ contains patches that intentionally plant defects. .gitattributes marks those patches as vendored, while .sych/config.yaml identifies labelled evaluation cases and frozen fixtures so a claim anchored only in fixture data can be dropped.

That is different from pretending all fixture-adjacent implementation is safe. drop_fixture_claims in crates/sych-core/src/analysis/discovery.rs, called by crates/sych-app/src/analysis/passes.rs, filters candidates whose anchors all match fixture paths; real application code that reads a fixture remains application code. The important question is whether a finding describes the reviewed product or merely repeats a defect that a test case deliberately embeds.

A moved block is evidence, not just a minus and a plus

crates/sych-core/src/analysis/context/moves.rs, added in 00dc763 on November 12, identifies removed BASE lines that reappear in added HEAD lines in the same order, ignoring leading and trailing whitespace. A candidate block must contain at least three lines and 20 alphanumeric characters.

The search is bounded at 1,000,000 candidate-place comparisons and records when it stops. This lets contexts distinguish “removed test” from “test moved elsewhere” without claiming perfect move detection. The corresponding regression cases live in crates/sych-core/tests/analysis/moves.rs; source-side terminology is defined in the Glossary.

Clone this wiki locally