issueschema

package
v0.6.8 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2026 License: MIT Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package issueschema is the issue record's frontmatter schema as DATA: the property allow-list, the required set, and the closed enum value sets that issue.schema.json declares, held where every gate that asks the question can read them.

It exists for the same reason core/changelog holds the impact enum: the writer and reader of the ledger (core/capture) and the lint that GATES the committed ledger (core/lint) must agree about what a well-formed record carries, and two hand-kept copies of a schema fact drift the moment one side gains a field. It is a leaf — it imports only the standard library, no filesystem, no transport — because core/capture's own tests import core/lint, so a lint that imported capture back would be an import cycle in test.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Severities is the capture-time severity enum.
	Severities = []string{"nitpick", "minor", "major", "critical"}
	// Categories is the loose issue taxonomy.
	Categories = []string{
		"bug", "documentation", "drift", "inconsistency", "tech-debt", "security",
		"ux", "process", "architectural-insight", "future-work-seed", "observation",
	}
	// Sources is the surfacing channel enum.
	Sources = []string{
		"plan-review", "impl-review", "manual-test", "review-followup",
		"agent-finding", "agent-observation", "user-observation",
		"drift-detection", "memory-curation",
	}
)

The closed enum value sets from issue.schema.json. capture validates a record's severity/category/source against these, and record_schema mirrors the same membership check for the committed-ledger gate (iss-2608270908342889). Held once here so the two gates cannot disagree about what a legal value is.

View Source
var Known = map[string]bool{
	"schema_version": true, "id": true, "slug": true, "severity": true,
	"category": true, "source": true, "found_during": true, "found_at": true,
	"details": true, "suggested_fix": true, "related_intents": true,
	"promoted_to": true, "related_specs": true, "related_issues": true,
	"synthesis_clusters": true, "wontfix_reason": true, "resolution": true,
	"resolved_by": true, "blocked_by": true,

	"shipped_in": true,

	"impact": true,

	"created": true, "updated": true,
}

Known is issue.schema.json's additionalProperties:false allow-list: every property a well-formed issue record may carry. capture's reader refuses a record with any key outside this set (skipping it, so it goes invisible to every capture surface), and record_schema reports the same key so the committed-ledger gate refuses what the reader refuses (iss-2608261447039180). It is the ONE copy both read.

View Source
var Required = []string{
	"schema_version", "id", "slug", "severity", "category", "source", "found_during",
}

Required is every property the issue schema marks required, in the order a record writes them. A record missing one is not a lax record: the ledger reader refuses it and skips it, so it goes silently invisible to every capture surface while still sitting in the ledger — which is what record_schema reports.

View Source
var RequiredStrings = Required[1:]

RequiredStrings is Required minus schema_version — the required properties whose value is a string. schema_version carries the integer version and is checked against the readers this repository ships, so it is validated on its own before the string-typed properties are walked. It is a slice OF Required rather than a second literal, so the two can never disagree about the set.

View Source
var SlugRe = regexp.MustCompile(`^[a-z0-9]+(-[a-z0-9]+)*$`)

SlugRe is the kebab-case slug pattern (lower-case alphanumerics joined by single hyphens). A slug becomes a filename, so both the ledger writer and the record-lint gate hold it to exactly this shape.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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