0034 — Publish the detector limits in the SDK
Status: accepted
Problem
The detector contract already types a detector’s inputs (DetectorInputs), its findings (DetectorFinding, with
an optional confidence), and ships one shared conformance suite and a new-detector template. The limits were the
missing part: the 1,000,000-byte file ceiling, the 32-directory depth ceiling, and the vendored directories no
finding may come from existed only as private constants in the conformance bounds check. An author outside the
repository could not import them, and the docs could not point at a single source.
Decision
src/sdk.tsexportsDetectorLimitsand the frozenDETECTOR_LIMITSvalue holding those three bounds.boundsCheckreadsDETECTOR_LIMITS; itsCONFORMANCE_MAXIMUM_*exports keep their names and values.- The change is additive.
evergreen.detector.v1is unchanged, no detector is required to read the value, and no bound changes.
Alternatives rejected
- A
limitsfield onDetector. Per-detector limits would let a detector declare looser bounds than the contract promises. The bounds are a property of the interface version, not of one detector. - Leaving the constants in conformance. They stay unimportable and undocumented as part of the contract.