issueschema

package
v0.13.2 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: MIT Imports: 5 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

View Source
const (
	// AdmissionFamily identifies one admission (adm-N): one proposal admitted
	// into the candidate set, with the grounds it was admitted on.
	AdmissionFamily = "adm"
	// SurpriseFamily identifies one surprise entry (srp-N): something the
	// researcher did not expect, recorded as its own act.
	SurpriseFamily = "srp"
)

The two families this design adds. Both mint through recordid.Minter.Mint like every other record family in this workstream (adr-45): a UTC stamp plus four random digits, never content-derived, so two admissions of the same proposal stay distinguishable.

View Source
const (
	// AdmissionsDir holds one directory per run: admissions/<run-id>/adm-<N>.md.
	// An admission is bucketed by RUN, exactly as the reading store is, because it
	// is meaningful only against the run whose proposals it admits.
	AdmissionsDir = "admissions"
	// SurprisesDir is FLAT: surprises/srp-<N>.md. A surprise is keyed to whatever
	// occasioned it — a detection, an admission, a consequence — and that key is
	// carried in the record's own `occasioned_by`, never in the directory. Keying
	// the directory would tie a surprise to one occasion's family and re-open the
	// collapse this record exists to prevent: it is never a field on a
	// disposition, and it never shares a key with one.
	SurprisesDir = "surprises"
)

The two sibling directories these families occupy under the issue ledger root. Like the reading families, they are deliberately NOT in StatusDirs: neither is an issue, and every gate scoped to the ledger's status folders must keep ignoring them.

View Source
const (
	// ReadingRunFamily identifies one reading run (rdg-N): the durable run
	// record and its manifest under .abcd/development/readings/<run-id>/.
	ReadingRunFamily = "rdg"
	// ReadingItemFamily identifies one reading item (rdi-N) — one thing the
	// instrument returned.
	ReadingItemFamily = "rdi"
	// DispositionFamily identifies one disposition (dsp-N) — one answer to one
	// item.
	DispositionFamily = "dsp"
)

The three record families this design adds. Each mints through recordid.Minter.Mint, which validates any lowercase family and consults no maximum (adr-45): an id is a UTC stamp plus four random digits and is never content-derived, so two runs returning the SAME tension carry different ids for free — a re-raise stays distinguishable from its first appearance, and the recurrence signal survives.

View Source
const (
	// ReadingsDir holds one directory per run: readings/<run-id>/rdi-<N>.md.
	ReadingsDir = "readings"
	// DispositionsDir is keyed by the ITEM: dispositions/<item-id>/dsp-<N>.md.
	// Keying the directory on the item and the file on the disposition's own id
	// settles two requirements that pull against each other — status is one
	// directory probe, and a disposition still has an id of its own, so the only
	// exit from a `held` state (a superseding disposition that CITES the one it
	// replaces) has something to cite.
	DispositionsDir = "dispositions"
)

The two sibling directories the working-tier families occupy under the issue ledger root. They are deliberately NOT in StatusDirs: a reading item's status is the presence of its keyed disposition directory, which is one probe, and never a folder-membership question. Every gate scoped to the ledger scopes to StatusDirs and therefore ignores both.

View Source
const (
	// DispositionAccepted is available at every position. At the widening
	// position acceptance IS admission — a state encoding the position would
	// duplicate the envelope.
	DispositionAccepted = "accepted"
	// DispositionRejected asserts a purpose the closing run tests, so it is
	// never available at the widening position.
	DispositionRejected = "rejected"
	// DispositionDeclined is the widening position's only: the proposal was
	// admissible and the researcher chose otherwise, asserting nothing testable.
	// Forcing that into `rejected` would manufacture a principle never at stake.
	DispositionDeclined = "declined"
	// DispositionHeld is directional, and requires an epistemic exit condition.
	// A hold exits only through a superseding disposition that cites it — never
	// by expiry, and never silently.
	DispositionHeld = "held"
)

The four disposition states that ship. itd-180 and ruling (19) both say FIVE states and both enumerate four; the schema is data, so a fifth is one line the day it is named, and naming it is a vocabulary judgement belonging to the researcher rather than to this build. The discrepancy is carried here, not resolved.

Nothing meaning "already covered" exists at any position: an undispositioned item is REPORTED as outstanding, never named as a state.

View Source
const (
	// ReframeFamily identifies one reframe record (rfm-N). It mints through
	// recordid.Minter.Mint like every family in this workstream (adr-45).
	ReframeFamily = "rfm"
	// ReframesDir is FLAT, like SurprisesDir: reframes/rfm-<N>.md. A reframe is
	// keyed by what it carries — its occasion and its fingerprints — never by a
	// directory, and like the other reading-chain families it is deliberately
	// not in StatusDirs.
	ReframesDir = "reframes"
)
View Source
const CategoryLapse = "lapse"

CategoryLapse is the category whose records may state WHEN the discipline gave way, on lapsed_at. spc-60 obliged the value on this category; the obligation is parked (iss-2609091009111294) until the rethink of the reading work settles what a lapse record must carry, so lapsed_at is optional everywhere and format-checked wherever it is present. It is spelled once here because two gates read it — the ledger reader (core/capture) and the committed-ledger gate (core/lint) — and a second copy would let one of them go on refusing what the other accepts.

View Source
const MachineRemedy = "none (filed automatically)"

MachineRemedy is the one remedy an automatic filer writes when it has no fix to propose (ruling H12 of 2026-09-29): every new issue carries a remedy (ruling BX3), and a finding a machine files has none yet. A drain skips a record carrying it until a person writes a real remedy (`abcd capture remedy`), and the capture surface refuses it from a person, so the value always means a machine filed the record.

View Source
const MigrateHint = "run `abcd capture migrate --apply` to rewrite it"

MigrateHint is the remedy every refusal of a retired key names.

View Source
const PositionWidening = "widening"

PositionWidening is the reading position whose items are PROPOSALS: the one position where acceptance is admission into a candidate set, and therefore the one whose answer set is wider than a disposition (spc-67). It is named because two packages now branch on it, and a position spelled as a literal in a branch is a position that can drift out of the table below without anything saying so.

View Source
const ReadingsRecordDir = ".abcd/development/readings"

ReadingsRecordDir is the DURABLE home of a run's own artefacts — the promoted manifest, the run metadata and a refusal — as distinct from ReadingsDir, which is the working-tier bucket holding the run's reading records.

It lives here rather than in core/reading because two packages name it: core/reading writes it, and core/capture reads it to answer "which comparative run characterised this widening run" (ComparativeRunFor). `reading` keeps an alias so its own callers read unchanged, and the two packages name one directory rather than two strings that agree today (spc-2609020626039834).

View Source
const RecordReadLimit = 1 << 20

RecordReadLimit is the byte cap on ONE record of these families, and it lives here for the same reason the property allow-list does: both readers of the family must apply it, and a cap the board applies loosely while the verb applies tightly means an oversized disposition stands on the board and is refused by the verb — the ledger then says two things about one file. There were two caps, eight megabytes apart, before this was one.

A reading record and a disposition are single-screen documents. The cap is not there to bound legitimate content; it is there so a device, or a file swapped for a huge one, cannot make a read unbounded. The issue family applies the same cap for the same reason (GHSA-fh9j-8xmg-m33f): an issue record is a page, and the largest one this repository has ever carried is under one sixtieth of it.

View Source
const RunArtefactReadLimit = 4 << 20

RunArtefactReadLimit is the ceiling a run's own artefacts (its manifest, its bundle) are read under, by the reading channel and by the gate that reads a committed run's manifest back. A manifest carries the run's whole item list, so it is bounded by the channel's ceiling rather than a single record's.

View Source
const RunManifestFileName = "manifest.json"

RunManifestFileName is the manifest a run was assembled from. The channel's ingest promotes it into the durable run directory BEFORE it writes the run record, so a committed run holds both, and the two agree on the run id, the position and the candidate join. The ordering gate reads that agreement (capture.ComparativeRunFor), which is why the name lives here rather than in core/reading alone.

View Source
const RunRecordFileName = "run.json"

RunRecordFileName is the run-metadata file inside a durable run directory. It is the COMMIT MARKER: a run without one never happened, and its reading records are the next ingest sweep's to roll back.

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",

		"lapse",
	}
	// 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",

		"managed-repo",
	}
)

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 AdmissionKnown = knownSet(AdmissionRequired)

AdmissionKnown is the admission's additionalProperties:false allow-list. The record has no optional half: an admission is exactly the proposal, the run and the grounds, and a key outside that set is a field nothing reads.

View Source
var AdmissionRequired = []string{"schema_version", "id", "run", "proposal", "grounds"}

AdmissionRequired is every property an admission record carries. `proposal` names the widening item admitted (an rdi-N); `run` is the run whose candidate set it joins; `grounds` is free text and non-empty, the analogue of the disposition_grounds a rejection already requires.

It is the ONE list: core/lint's adm store declares its requiredFields from this value, so the gate and the schema cannot disagree about what a well-formed admission carries.

DispositionAvailability is the per-position availability of each state: the coupling ruling (19) put on the schema, which the disposition validates against by reading `position` off the keyed reading record.

A pair the design has NOT ruled is ABSENT from the inner map, and absence is three-valued on purpose: `held` at the widening position was deferred by the facilitator on 2026-08-30 with a revisit point at the first widening run's dispositions, so that one row ships unfilled and its refusal is not armed. An unfilled pair is permitted quietly rather than refused, because refusing a combination nobody has ruled would decide the deferral by implementation.

View Source
var DispositionKnown = dispositionKnown()

DispositionKnown is the disposition's allow-list.

View Source
var DispositionRequired = []string{"schema_version", "id", "item", "state"}

DispositionRequired is what every disposition carries whatever its state. `disposition_grounds` is NOT here: it is required on every state except `held`, which is a per-state rule rather than a schema-wide one.

DispositionStates is the shipped state vocabulary.

View Source
var FrameSurfaceNames = []string{"construal", "glossary", "scope"}

FrameSurfaceNames are the three committed surfaces the frame is, in the order the record carries them (adr-55's enumeration, as adr-2609021016288378 adopted it): the framing chapter's construal section, the committed glossary terms and the committed scope. `changed` is drawn from this vocabulary, and each name N is carried as the pair N_before / N_after.

View Source
var HoldMoscowValues = []string{"must", "should", "could", "wont"}

HoldMoscowValues is the stated (dormant) grammar of the MoSCoW axis.

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,

	"lapsed_at": true,
	"details":   true,

	"remedy": true, "suggested_fix": true, "related_intents": true,
	"related_specs": true, "related_issues": true,
	"synthesis_clusters": true, "wontfix_reason": true, "resolution": true,
	"resolved_by": true, "blocked_by": true,

	"duplicates": true, "refines": true,

	"shipped_in": true,

	"deferred_after": true, "deferral_reason": true,

	"origin": true, "production_mode": true,

	"impact": true,

	"grounds": 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 Positions = positionValues()

Positions is the position values alone, in ReadingPositions order — for a membership check and for the message that quotes the legal set.

View Source
var ReadingBodyFields = bodyFieldsByPosition()

ReadingBodyFields is the per-position required body set, derived from ReadingPositions so the table and the lookup cannot disagree.

View Source
var ReadingKnown = readingKnown()

ReadingKnown is the reading record's additionalProperties:false allow-list: the envelope, every body field of every position, and the optional properties below. A key outside it is refused, exactly as it is on an issue.

View Source
var ReadingPositions = []ReadingPosition{
	{Position: PositionWidening, Regime: "generative", Fields: []string{"configuration", "what_admits_it"}},
	{Position: "entailment", Regime: "explicative", Fields: []string{"claim_surfaced", "claim_type", "what_implies_it"}},
	{Position: "comparative", Regime: "evaluative", Fields: []string{"candidate_id", "criterion", "characterisation"}},
	{Position: "detection", Regime: "registrative", Fields: []string{"tension", "constraint_in_play", "why_a_tension"}},
}

ReadingPositions is the closed set of positions, each with its body.

itd-180 offers a discriminated union and names a fallback; the FALLBACK is what ships. Go has no discriminated union, and this package's whole idiom is already "the schema is a value both the writer and the gate read" — four Go types would be four places for one schema to drift. So: one record type, an untyped body, and the per-position required-field set held here as data.

View Source
var ReadingRequired = []string{
	"schema_version", "id", "run", "manifest", "position", "regime", "pattern",
}

ReadingRequired is the reading record's envelope: every property an item carries whatever position returned it. `pattern` is here rather than in a body for ruling (18)'s reason — it is a universal core condition.

View Source
var ReframeAfter = []string{"construal_after", "glossary_after", "scope_after", "changed"}

ReframeAfter is the half a reframe record gains when it is complete: the three after fingerprints and `changed`, the surfaces whose fingerprints differ. All four are absent while the record is open and present once it is complete, never some of them.

View Source
var ReframeKnown = func() map[string]bool {
	known := knownSet(ReframeRequired)
	for _, f := range ReframeAfter {
		known[f] = true
	}
	return known
}()

ReframeKnown is the reframe record's allow-list: the required set plus the after half, and nothing else — no key that could hold a surface's text.

ReframeOccasionFamilies is the CLOSED set of families a reframe's `occasioned_by` may name: a reading item, a disposition or a surprise. It is the one list the verb resolves the occasion over and the record gate holds a committed record to.

View Source
var ReframeRequired = []string{
	"schema_version", "id",
	"occasioned_by",
	"construal_before", "glossary_before", "scope_before",
	"grounds",
}

ReframeRequired is every property a reframe record carries from its first write: the occasion, the three before fingerprints and the grounds.

It is the ONE list: core/lint's rfm store and core/capture's writer both read it, so the gate and the writer cannot disagree about what a well-formed reframe carries.

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 ReservedHoldFields = []string{"hold_frame_location", "hold_moscow"}

ReservedHoldFields are the two-axis hold field: reserved, grammar stated, and DORMANT. frame-location is free text naming the frame element; MoSCoW is one of HoldMoscowValues. Reserving costs nothing and retrofitting is expensive, so the fields are in the schema now — but a populated value is refused until activation is ruled, which makes the reservation a behaviour rather than a comment.

View Source
var Retired = map[string]string{"promoted_to": "related_intents"}

Retired maps a frontmatter key a ledger record once carried to the key that replaced it. The promote join's forward stamp was the scalar `promoted_to` until itd-4 AC3 renamed it: the promoted intent is a member of the record's `related_intents`, and the intent names the record back in `related_issues`.

A retired key is NOT in Known, so the reader refuses a record carrying it — no reader tolerates the old spelling (DECISIONS.md, 2026-09-23). This map exists so that refusal, the committed-ledger gate's and the drift check's all name the successor and the one verb that rewrites it, `abcd capture migrate`, instead of reporting an unexplained unknown property.

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.

View Source
var StatusDirs = []string{"open", "resolved", "wontfix"}

StatusDirs is the issue ledger's status-directory list, in the order a surface renders them. The directory a record sits in IS its status — there is no status field — so this list is simultaneously the set of folders the writer provisions, the set the readers scan, and the set the deterministic gates scope their pathspecs to. Those three had four spellings between them (lint's own list, two literals in capture's allocator, and the shell gate's pathspec), and the day a SIBLING family joined the ledger tree was the day the fourth spelling became a silent divergence: a record can only land somewhere every side agrees to look.

It lives here for the same reason the property allow-list does — the one leaf both core/capture and core/lint already read the ledger's schema from. The shell gate cannot import Go and therefore holds the second and last spelling, pinned to this value by a test.

View Source
var SurpriseKnown = knownSet(SurpriseRequired)

SurpriseKnown is the surprise entry's allow-list.

SurpriseOccasionFamilies is the CLOSED set of families a surprise's `occasioned_by` may name: a reading item (rdi-N), an admission (adm-N) or a disposition (dsp-N) — and nothing else, prose included (spc-2609020626040342). It is the one list: the surprise verb resolves the occasion over it, and core/lint's srp join holds a committed record to it, so a hand-written prose occasion is a finding rather than a join that joins nothing.

View Source
var SurpriseRequired = []string{"schema_version", "id", "occasioned_by"}

SurpriseRequired is every property a surprise entry carries. `occasioned_by` names the record that occasioned it and is the record's whole join. The surprise ITSELF is the record's body, where a reader can write more than a frontmatter value holds.

Functions

func DispositionFileID added in v0.7.0

func DispositionFileID(name string) (string, bool)

DispositionFileID returns the id a ledger filename claims and whether it claims one at all. A file naming nothing (a README, a stray note) is not an answer and contributes neither presence nor a supersession edge.

func DispositionStateAvailable added in v0.7.0

func DispositionStateAvailable(position, state string) (available, ruled bool)

DispositionStateAvailable reports whether state is available at position, and whether that pair has been RULED at all. A caller refuses only on (available=false, ruled=true): an unruled pair is the deferral above, and deciding it here would settle by implementation what the facilitator deferred.

func IsMachineRemedy added in v0.12.0

func IsMachineRemedy(remedy string) bool

IsMachineRemedy reports whether a remedy is MachineRemedy, compared trimmed and case-folded, so a hand-typed variant of it is recognised as the same value rather than read as a real remedy.

func LedgerDirs added in v0.8.0

func LedgerDirs() []string

LedgerDirs is every directory the issue ledger's record families occupy under the ledger root, in the order a reader meets them: the three status directories, then the sibling families that are deliberately not among them.

It is DERIVED from the constants above it rather than restated, so a family this package gains is in the list from the day its constant is declared. The reframes directory (spc-2609020626048705) joined by declaring its constant and adding it here in the same change.

func ReadingRegime added in v0.7.0

func ReadingRegime(position string) string

ReadingRegime is the supply regime a position implies ("registrative" for the detection position, and so on) — also the design record's name for the body that position returns, which is why a refusal quotes it: a message then names the shape the reader will look up rather than only the position that produced it. An unknown position yields "", which the caller reports as an unknown position rather than as a regime mismatch.

func RemedyOf added in v0.12.0

func RemedyOf(fm map[string]any) string

RemedyOf is a record's remedy read from its frontmatter: the `remedy:` value when the record carries a non-blank one, else the older `suggested_fix:` (spc-2609212015054359 scope 1: the migration reads the old key as the new one where present). Every reader asks this, so the two spellings have one precedence. A value that is not a string reads as absent; the strict validator is what refuses it.

func StandingDispositionIDs added in v0.7.0

func StandingDispositionIDs(records []DispositionRecord) []string

StandingDispositionIDs returns the ids of the records no sibling supersedes, sorted — the answers currently in force, which is exactly one in a healthy ledger. None means the item is unanswered, which the outstanding report says out loud and no state names; more than one is a ledger fault the write path refuses, and no reader may pick a winner from it.

The superseded set is built only from WELL-FORMED records, which is the whole convergence: a record neither reader can read retires nothing, and it does not vanish either.

func ValidFingerprint added in v0.11.1

func ValidFingerprint(v string) bool

ValidFingerprint reports whether v is verbatim a lower-case 64-hex SHA-256.

func ValidFrameSurface added in v0.11.1

func ValidFrameSurface(v string) bool

ValidFrameSurface reports whether v names one of the three frame surfaces.

func ValidLapsedAt added in v0.7.0

func ValidLapsedAt(v string) bool

ValidLapsedAt reports whether a non-empty lapsed_at value is well formed: an RFC 3339 instant. A bare date names a day rather than a moment and free text names nothing a reader can order, so neither can carry the claim the property makes. The offset is not constrained to Z — RFC 3339 fixes the instant either way — while the convention the record pages state is UTC.

func ValidReframeOccasion added in v0.11.1

func ValidReframeOccasion(v string) bool

ValidReframeOccasion reports whether v is VERBATIM a handle of one of ReframeOccasionFamilies: the family's own prefix, one hyphen and digits, with nothing around it.

func ValidSurpriseOccasion added in v0.11.1

func ValidSurpriseOccasion(v string) bool

ValidSurpriseOccasion reports whether v is VERBATIM a handle of one of SurpriseOccasionFamilies: the family's own prefix, one hyphen and digits, with nothing around it.

Types

type DispositionRecord added in v0.7.0

type DispositionRecord struct {
	// ID is the record's id, taken from its filename.
	ID string
	// State is the disposition's state, or "" when the record does not carry one.
	State string
	// ExitCondition is what would end a held disposition.
	ExitCondition string
	// Supersedes is the disposition this one replaces, or "" when it replaces
	// none. It is EMPTY on a record that is not well-formed, whatever the bytes
	// say: a record no reader can read cannot be trusted to retire another.
	Supersedes string
	// WellFormed reports whether the frontmatter block is one every reader of
	// this ledger can read: opened on the first line, closed, and carrying no
	// duplicated top-level key. A record that is not well-formed still STANDS —
	// dropping it would let a malformed file silently remove the answer it claims
	// to replace — so it is the caller who is told there is something here to
	// deal with.
	WellFormed bool
}

DispositionRecord is one disposition as the standing computation sees it: the fields that decide what is in force, plus whether the record is well-formed enough to be trusted with them.

func ParseDisposition added in v0.7.0

func ParseDisposition(id, content string) DispositionRecord

ParseDisposition reads one disposition's frontmatter. It is deliberately its own small scanner rather than either package's: the strict ledger parser refuses more than this question needs to know, and the lenient line scanner reads past shapes that make a record untrustworthy. What both sides need is exactly this — the three deciding fields, and an honest verdict on whether the block they came from can be read at all.

type ItemFate added in v0.8.0

type ItemFate struct {
	// Dispositions are the standing disposition ids, sorted.
	Dispositions []string
	// Admissions are the ids of the admissions naming this item as their
	// proposal, sorted.
	Admissions []string
	// Cyclic reports a supersession cycle: records are present and none stands,
	// so the item's fate cannot be READ. That is not the same fact as "no
	// disposition", and treating it as one would hand a reading a candidate
	// whose answer nobody can find (the same distinction core/capture's
	// standingDispositions already refuses to collapse).
	Cyclic bool
}

ItemFate is what the ledger says has happened to one reading item since it was returned: the dispositions standing over it and the admissions naming it.

It is the probe the comparative assembly reads before it hands a candidate to a reading. The candidate set the design fixes is PRE-ADMISSION — the widening reading's returned configurations before anyone answered them — so an item carrying either is not a candidate, and the assembly refuses rather than handing a reading the researcher's judgement dressed as cold text (adr-2609021016272867; companion 8.3).

func JudgeItemFate added in v0.8.0

func JudgeItemFate(records []DispositionRecord, admissions []string) ItemFate

JudgeItemFate is the JUDGEMENT half, given the disposition records of one item and the admission ids naming it. The WALKS live in core/capture, which holds the ledger's filesystem; the decision lives here beside StandingDispositionIDs for the reason that file states — two readers of one question are tolerable, two answers are not.

func (ItemFate) Contested added in v0.8.0

func (f ItemFate) Contested() bool

Contested reports more than one standing disposition — a ledger fault the write path refuses and only a hand edit can produce. A contested item's fate is as unreadable as a cyclic one for this purpose: no reader may pick a winner from it, so it is not demonstrably uncommitted.

func (ItemFate) Free added in v0.8.0

func (f ItemFate) Free() bool

Free reports whether the item carries no fate at all: no standing disposition, no admission, and a disposition set that could be read.

type ReadingPosition added in v0.7.0

type ReadingPosition struct {
	// Position is the envelope's `position` value.
	Position string
	// Regime is the supply regime this position implies, and the name of the
	// item body it returns.
	Regime string
	// Fields are the body properties an item at this position must carry. The
	// pattern named is NOT among them: it is an envelope field, because a
	// universal core condition must not live in a variant part (ruling (18)).
	Fields []string
}

ReadingPosition binds one reading position to the supply regime it implies and the body its items carry.

Two vocabularies meet here and both are load-bearing, so they are bound in one place rather than left to agree by habit: Position is the value the envelope carries (the instrument's own name for where it read from), and Regime is the supply regime that position was read under, which also names the item body it returns. Ruling (17) is what makes the pair necessary — "detection" stays the name of the Step-6 instrument and of its REGISTRATIVE body — and a table that held only one of the two names would leave the other to drift in prose.

The regime is resolvable by position ALONE, which is the property ruling (4) and ruling (18) rest on: it is stated in the reading's definition and no operator input can set it. Binding the pair here is what lets the ingest check that rather than take a caller's word for it.

type RunHead added in v0.8.0

type RunHead struct {
	RunID string `json:"run_id"`
	// Position is the run's reading position, as the run record states it.
	Position string `json:"position"`
	// CandidateRun is the widening run a comparative run characterised, empty at
	// every other position.
	CandidateRun string `json:"candidate_run"`
}

RunHead is the strictly decoded subset of a committed run record that answers one question: which widening run did this comparative run characterise?

It is a SUBSET on purpose. The full run record is core/reading's shape and carries the instrument, the refusals and the bounds; a reader asking only about the candidate join has no business decoding those, and a decoder that had to would break every time the record grew a field.

Jump to

Keyboard shortcuts

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