defaultvaluescore

package
v0.40.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package defaultvaluescore is the default-value scorecard -- the RECURRING GUARD for epic #1089's finding: fak value features that ship NOT-fully-enabled (compaction was illegible, amplification dead-on-proxy, vcache modeled, kvmmu unwired). Each of those regressed silently; this card makes "a value feature shipped off / vacuous / modeled" a tracked debt integer that a CI floor can pin, so it can never silently regrow.

Like internal/conflationscore it is a TREE-READING scorecard (no data dir): the flag definitions in cmd/fak/guard.go + cmd/fak/serve.go and the exit-summary / score surfaces ARE the data, parsed from the Go source, so the score cannot be gamed by editing a JSON file -- only by fixing the real wiring. The allow-list of value-flags that may legitimately ship OFF lives here WITH a reason; an OFF value-flag not on the list is debt. The scoring fold / grade / markdown machinery is the shared kernel in pkg/scorecard; this package holds only the default-value-specific tables, parsing, and the four KPIs that map worst-first onto the child issues #1090-#1095.

The four checks (issue #1096):

  1. VALUE_FLAG_OFF -- a value-flag (a cost/cache/amplification lever) parsed from guard.go/serve.go that ships default-OFF, unless allow-listed with a reason.
  2. VALUE_FLAG_CONTEXT_DRIFT -- a value saver offered in BOTH serving surfaces (guard.go AND serve.go) that ships default-ON in one but default-OFF in the other, so the same cost/cache/context win is silently disabled on one serving path. Scoped to SHARED flags, so a role-specific saver present in only one surface is never a false positive.
  3. VACUOUS_ON_GUARD -- an exit-summary line that folds kernel.Counters (VDSOHits/Transforms/Denies/EngineCalls) WITHOUT a proxy-aware path-split, because those counters are structurally 0 on the Decide-only `fak guard -- claude` proxy.
  4. C_MODELED_NOT_OBSERVED -- a score/report surface whose DEFAULT headline source is "planned"/modeled rather than observed live telemetry.

Index

Constants

View Source
const AmplificationSurface = "cmd/fak/guard.go"

AmplificationSurface is the exit-summary source whose kernel.Counters fold check 2 grades. It is the file that renders the `fak guard:` exit lines.

View Source
const CleanFloor = 0

CleanFloor is the disciplined tree's expected debt; the live-tree smoke pins the scorecard against silent regrowth. It is ZERO: epic #1089's last tracked default-value defect -- the vcache score surface defaulting its headline source to "planned" (modeled), the C_MODELED_NOT_OBSERVED gap -- is retired. internal/vcachescore/score.go now defaults its headline to the OBSERVED cache value (ActiveSourceObserved) and labels the witness-free fallback honestly as a FORECAST (ActiveSourceForecast), never a modeled number dressed as measured. The floor is 0 so the gate fails the instant ANY default-value debt reappears.

View Source
const DebtKey = "default_value_debt"

DebtKey is the headline integer the control-pane folds (scorecard_control_pane reads corpus.default_value_debt).

View Source
const Schema = "fak-default-value-scorecard/1"

Schema is the control-pane schema id the fold and any consumer key on.

Variables

View Source
var FlagSources = []string{
	"cmd/fak/guard.go",
	"cmd/fak/serve.go",
}

FlagSources are the two surfaces whose value-flags this card classifies. guard.go is the flagship `fak guard -- claude` proxy; serve.go is the in-kernel serve loop. Both define their knobs with the same flag.FlagSet idiom, so one parser reads both.

View Source
var ScoreSurfaces = []string{
	"internal/vcachescore/score.go",
}

ScoreSurfaces are the score/report surfaces check 3 grades for a default "planned"/ modeled headline source.

Functions

func Build

func Build(root string) scorecard.Payload

Build reads the flag + exit-summary + score surfaces, runs the three KPIs, and folds them into the control-pane payload via the shared kernel. root is the repo root.

func ParseFlags

func ParseFlags(text, source string) []valueFlag

ParseFlags pulls every fs.<Kind>(...) value-flag out of a flag-source file and returns the ones that are VALUE flags (in scope for the default-on rule). The default-on judgment is per kind: a Bool is on iff its default literal is true; an Int/Float/ Duration is on iff its default is a NON-zero literal (0 / 0s is the documented "off" sentinel across guard.go/serve.go); a String is on iff its default is a non-empty literal. A default that references a named constant (e.g. gateway.DefaultCompact- HistoryBudget) is treated as ON -- a named default-budget constant is the codebase's idiom for "shipped enabled", and conflating it with 0 would false-positive the very flags #1089 fixed to be default-on.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL