Sam's explicit requirement: the definitive gate should catch lint
regressions, not just fmt/vet/build/test. Immediately surfaced real
debt on the first run -- see follow-up beads issues.
The example log module's install comment claimed a default module_dir of
~/.config/archie/modules. ModuleDir defaults to empty (internal/config),
and the canonical example path is ~/.local/share/archie/modules, consistent
with plugin_dir/work_dir/skills_dir in config.example.toml. Recomment to
point at config.example.toml's module_dir and drop the overclaim.
Docs audit finding (.crew/reports/docs-audit.md): no live architecture doc
contradicts today's changes; Module-family documentation in ARCHITECTURE.md
is deferred pending sign-off and parity with the Memory precedent.
Seventh slice of docs/prds/eda-playbook-engine.md (t2db.15), consuming
t2db.14's expr package: the rich trigger+actions playbook document and
the coordinator that dispatches it.
- internal/domain/eda/playbook: Load(dir) reads *.yaml/*.yml playbook
documents (trigger + exactly one workflow-kind action + optional CEL
when), validating the HARD BOUNDARY at load: a playbook with 2+ actions
or a non-workflow action position is a reported load failure --
multi-action and Module/Channel/Forge actions stay blocked on the
unresolved execution-time gaps. Any malformed YAML, invalid trigger,
missing workflow name, or when compile failure fails the WHOLE load
(reject-at-load, same shape as routing collisions); a missing dir is an
empty store. Trigger reuses the existing workintake kind/label
vocabulary (no second label-matching mechanism). Dispatch matches
trigger, evaluates when (CEL, event context with actions: {} -- no
prior actions in single-action playbooks), and returns the named
workflow from the registry via the same lookup Route() uses -- no
duplicated dispatch logic. when eval error follows the resolved doc's
J3: false, skip, caller logs.
- Store.Dispatch(reg, DispatchInput) is the coordinator entrypoint; input
carries Labels/Kind/Event. Production task intake wiring
(daemon.go/pollNATS/publishTask) is explicitly NOT in this ticket -- a
follow-up; proven end to end via direct tests plus the shipped example
(examples/eda-playbooks/bug-tdd.yaml) loaded and dispatched through the
real path.
- Config: EDAPlaybookDir (eda_playbook_dir), documented as DISTINCT from
PlaybookDirs (flat binding files) -- a reader cannot confuse the two.
- Bootstrap: playbook.Load wired in loadWorkflows, log-and-abort on
failure matching every prior slice; nonexistent dir is an empty store.
- workflow.Route(), workflowForLabels, and the t2db.9-.12 binding loaders
are UNTOUCHED (verified: their full test suites pass, zero regressions).
Also carries small lint cleanups on t2db.13/.14 code flagged by the gate
run: expr Eval no longer type-asserts to ref.Val (Eval returns ref.Val
directly in v0.32.0; cel-go's own Eval wraps evaluation in recover --
verified in source); module decodeLogArgs extracted to clear the nestif
finding. golangci-lint: 0 issues.
Tests (10): single-action round trip, when-false skip, 2-action load
failure, non-workflow position load failure, when compile failure drops
playbook, empty trigger load failure, trigger mismatch skip, no-when
match, one-invalid-file fails whole load, missing dir empty store, plus
the shipped example load+dispatch. task check clean (113/113 UI, exit 0).
Sixth slice of docs/prds/eda-playbook-engine.md (t2db.14): the
internal/domain/eda/expr package implementing the resolved open question 1
(CEL decision), standalone -- no coordinator/dispatch yet, mirroring how
t2db.13 built ModuleRegistry before any consumer.
- NewEnv: CEL env declaring the two context roots (event + actions, both
map(string, dyn)) with DefaultCostLimit (100,000, tunable per J5).
- Compile: parses/type-checks an expression string; syntax error, unknown
root (anything other than event/actions), or type error is a returned
error -- the reject-at-load entry point the playbook loader and lint
tool will share.
- Eval: evaluates a compiled program against a dispatch-time Context;
missing-field/wrong-type/cost-limit errors are returned, never panics.
No recover() wrapper: CEL is panic-free by design, verified by the
hostile-data tests (5000-deep map, no panic). CEL's ref.Val wrappers
(types.Bool etc.) are unwrapped to native Go values.
Dependency: cel.dev/cel-go v0.32.0 (direct), the only new dependency,
already vetted in the resolved doc's vetting record -- no re-vet.
Tests (table-driven, verified against real CEL semantics, not guessed):
valid boolean against event fields; syntax error at compile; unknown root
rejected at compile naming the root; missing event field errors not
panics (== on a missing key evaluates false -- verified CEL semantics);
has() presence macro; actions context reads; deep-nested hostile data
error-free or false without panic; cost-limit enforcement proven by
aborting a macro expression under a tiny limit (CEL's cost model accrues
on map/filter iteration, not field reads -- verified by probing).
task check clean (113/113 UI, exit 0).
CEL (cel.dev/cel-go, pinned v0.32.0) is the single expression mechanism
covering both an action's `when` condition and its `args` values,
evaluated against a read-only context (`event`, `actions.<id>.result`).
Rejects the custom-gate precedent (Yaegi-in-YAML) as inverting the
design's own "YAML is data, Yaegi is logic" premise. Expressions
compile/type-check at playbook load, consistent with the existing
collision-handling reject-at-load rule; generated Module Result schemas
become CEL type declarations so result-path typos reject at load too.
Vetted against expr-lang/expr, gval, govaluate (archived), starlark-go:
CEL wins on structural safety (non-Turing-complete, CostLimit-bounded,
error values not panics, zero security advisories on record) despite
the largest binary cost (+13MB) of the candidates -- accepted because
the alternative is re-implementing CEL's type-checker on a bespoke
grammar for the same guarantee.
Sign-off (Sam, 2026-09-03): all judgment calls (J1-J5) accepted as
proposed, including J2's per-value CEL-literal quoting cost and the
+13MB binary size trade.
Cross-references in module-position.md updated to point at this
resolution instead of citing open question 1 as unresolved.
Fifth slice of docs/prds/eda-playbook-engine.md (t2db.13), implementing
docs/prds/module-position.md's recommended first slice: prove schema ->
go:generate -> Yaegi load -> ModuleRegistry end to end with a
side-effect-free action kind, before any kind with a real external effect
(notify, image-gen, forge writes) -- those stay blocked on the parent
doc's unresolved execution-time gaps (idempotency, mid-run failure).
- internal/domain/eda/module/log: hand-written schema source (Args/Result/
SchemaVersion per module-position.md) + logextract generated symbol
table via go:generate yaegi extract (same tooling as wfextract/
gateextract; scoped to ./internal/domain/eda/module/...).
- internal/domain/eda/module: ModuleRegistry with Register(kind, dir) /
Invoke(ctx, kind, rawArgs). No generic Module interface with an any
payload: each kind is its own tiny package with its own generated
contract; the registry's internal storage is the only place erasure
appears (exactly as inside wfextract). Invoke decodes rawArgs strictly
into the kind's Args before calling the interpreted function -- an
unknown key or wrong type is a reported failure, not a silent
zero-value fill (the 'schema defines the accepted message' rule).
Generalizes gateeval's fixed-signature Yaegi pattern via
yaegiutil.New/Resolve/Safe -- no new interpreter-construction or
panic-recovery mechanism.
- Config: ModuleDir mirroring PluginDir's shape and doc comment
(operator-trusted directory of Yaegi module implementations, one .go
per kind; empty means none loaded). Wired at daemon startup in
bootstrap.go alongside PlaybookDirs loading -- log-and-abort on load
failure (a broken module is a startup failure, not degrade-and-skip).
- examples/modules/log.go: operator-facing example (//go:build ignore,
mirroring examples/secret-engines/) proving the shipped contract.
Tests: registry (register/invoke, unknown kind, missing file, strict
arg-decode shape failures, malformed file, panic recovery), logextract
smoke test, and an example-load test that runs the shipped
examples/modules/log.go through the real registry (not a test fixture).
task check clean (113/113 UI, exit 0).
Playbook YAML action dispatch is deliberately out of this slice: a
minimal 'run this one module action, no chaining' dispatch still requires
naming how args values reach the action (parent doc open question 1 --
data-flow/interpolation syntax) and what the result feeds, both
unresolved by design. Dispatch is a follow-up ticket that consumes this
registry as-is; recorded in module-position.md.
Two pre-existing issues discovered while scoping the Module-position slice
(archie-core-e7bo), unrelated to the playbook engine work:
1. wfextract's //go:generate directive still targeted
internal/workflow, a path gone since the domain migration -- the
committed generated file was hand-patched for imports only, never
regenerated. 'go generate ./...' failed repo-wide, silently.
2. Regeneration surfaced real drift on three surfaces:
- wfextract: the committed table predated the migration and was
missing everything added since -- routing YAML loaders (t2db.9/.10/
.11), the review types, and the Forger/Reviewer/Trees interfaces
that TaskContext exposes to every interpreted stage plugin. A stage
plugin referencing tc.Trees or the review types could not resolve
them.
- pluginextract: internal/plugin/host.go (f73b2d1) added the
Host/Module/Manifest/Permission/Health/CapabilityKind/LifecycleState
/ModuleStatus types and NewHost/AdaptLegacy/HostAPIVersion, none of
which were ever extracted. A daemon plugin written against the
capability-host API (bootstrap.go:707 LoadDir) silently had no way
to reference them.
- secretextract: symbol exports were current; only the hand-applied
nil-guards and comments differ from raw generator output.
Fix: update the wfextract directive to internal/domain/workflow and
regenerate all four extract surfaces via 'go generate ./...'. Re-apply
the documented hand-written nil-guards on interface wrappers (Yaegi
wrappers omit them natively), restating the IMPORTANT note in wfextract's
package doc (it now has interface wrappers for the first time). Delete
the stale hand-patched wfextract generated file in favour of the
correctly-named regeneration.
Regression coverage (the previously-missing types are now reachable from
interpreted code, proven by tests that fail against the old tables):
- wfextract/reachability_test.go: interprets a stage plugin referencing
Trees/Reviewer/LoadPlaybookDirs and calls it; plus a Go-side nil-guard
test on the three wrappers.
- pluginextract/reachability_test.go: interprets a daemon plugin building
a Host from a Go-side Module and calls it end to end; plus nil-guard
tests on the _Module/_Plugin wrappers.
- secretextract keeps its existing wrapper nil-guard tests.
Verified red-then-green: after a fresh 'go generate ./...' wipes the
guards, the guard tests fail with nil-pointer panics; after re-applying,
they pass. task check clean (113/113 UI, exit 0).
Resolves eda-playbook-engine.md's deferred schema-generation question
for the Module action position. Generalizes the fixed-signature,
resolved-by-name Yaegi pattern already shipped three times (custom
gate, workflow stage plugins, skill plugins) instead of inventing a
new mechanism: one small hand-written schema package per action kind,
go:generate yaegi extract (the same command wfextract/gateextract
already use) producing its symbol table, a ModuleRegistry keyed by
kind rather than a generic any-typed Module interface -- keeping every
position individually compliant with the plugin engine rule instead
of reopening the generic-hook question event-sources-and-reactions.md
already closed.
Closes open question 3 (trust boundary: operator-installed, in-process,
same tier as PluginDir/SecretEngineDir -- not repository-supplied task
code). Recommends a side-effect-free first Module kind, since any kind
with a real external effect is still blocked on the parent doc's
unresolved execution-time gaps (idempotency, mid-run failure).
Fourth slice of docs/prds/eda-playbook-engine.md (t2db.12): the design
doc's pre-merge collision layer, as a gopls-shaped standalone binary
(cmd/archie-playbooks) rather than a Taskfile wrapper -- one binary, one
schema source, mode-based entrypoints.
- cmd/archie-playbooks: subcommand dispatch table from day one (lint now;
an lsp/serve mode later slots in without restructuring), flag parsing
only per organisation.md's cmd/ rule.
- internal/app/archieplaybooks: the lint mode's composition -- collects
directories, calls workflow.LoadPlaybookDirs (the daemon's own loader),
reports findings. No second validation path: the linter agrees with
runtime startup validation by construction.
- Reuses LoadKindWorkflowsYAML/LoadLabelWorkflowsYAML/LoadPlaybookDirs
directly; collision/malformed/invalid bindings exit non-zero.
- Known limitation recorded: findings are file-granular, not
line-granular (yaml.Unmarshal into map discards line numbers; a
file:line diagnostic needs a yaml.Node upgrade, out of scope here).
- Taskfile lint:playbooks target; PRD records the shipped shape and the
file-granular caveat.
Not a bundled-vs-standalone tradeoff: validation logic lives in
internal/domain/workflow with no knowledge of its caller, so archied
and agents already validate in-process, and the standalone cmd/
binary (t2db.12) exists only because CI/editors are out-of-process
consumers by nature. One implementation, two thin consumer shapes.
Third slice of docs/prds/eda-playbook-engine.md (t2db.11), completing open
question 2: instead of a single playbook dir, the config gains a LIST of
directories (playbook_dirs) of *.yaml/*.yml binding files, loaded at
startup as an additional input to workflow_routing_file and
workflow_labels_file, which remain supported unchanged.
- LoadPlaybookDirs(dirs []string) reads every yaml file across the
configured directories and merges kind + arbitrary-label bindings.
- This is what finally exercises the design doc's drop-and-report
collision rule: a single file cannot collide with itself, so the
cross-source path (two files in one dir, two dirs, or a dir plus a
single-file field) had never run in production. A binding key declared
by more than one source is a reported load failure, not a silent
pick-one by source order or version.
- Router-level collision handling: MergeKindWorkflows/MergeLabelWorkflows
fail on a key bound by both the single-file fields and the playbook
dirs, applied at boot.
- Config: PlaybookDirs []string, empty by default (no behavior change for
existing configs). Repo-scoping (typing dirs to Config.Repos owner/name)
is explicitly deferred to a separate later decision per ticket;
org/tenant keying is out of scope.
- PRD: records the list shape per Sam's correction (single dir would
contradict multiple independently-maintained playbook sources).
Second slice of docs/prds/eda-playbook-engine.md, complementing the
kind->workflow layer (WorkflowRoutingFile): the label vocabulary itself
becomes playbook data. A label outside the closed bug/feature/bootstrap
kind set (e.g. security) now dispatches to a registered workflow from an
optional WorkflowLabelsFile, instead of falling through to triage.
- LabelWorkflows + LoadLabelWorkflowsYAML/SetLabelWorkflows in
internal/domain/workflow/routing.go, mirroring the kind layer's
once-at-startup lifecycle. The closed Kind/NATS-subject set is
untouched; the map only extends binding authority for labels the kind
layer does not own.
- Collision rule per design doc: a label owned by the kind set, an empty
label, an empty workflow name, or a duplicate binding is a reported
load failure (dropped, logged, error returned to the caller) -- the
schema defines what is accepted; nothing is silently arbitrated by
schema/version.
- Route() precedence: explicit t.Workflow -> arbitrary-label binding ->
kind binding -> triage -> implement -> default.
- Config: WorkflowLabelsFile (workflow_labels_file), wired at boot
alongside WorkflowRoutingFile; documented in config.example.toml.
- PRD: records this slice's decisions (single-file shape, collision rule,
precedence) so later slices stay anchored.
First slice of docs/prds/eda-playbook-engine.md: which registered
workflow an intake Kind (bug/feature/bootstrap) prefers is now data,
loaded from an optional WorkflowRoutingFile, instead of a Go literal.
labelKinds and the NATS-subject-per-kind set are unchanged -- expanding
the label vocabulary itself is a separate, larger decision (subject
allocation) deferred per the design doc's open questions.
An unrecognised kind in the file is a reported load failure (schema
defines what's accepted, per the design doc's collision-handling rule),
not a silently-dropped binding. No file configured falls back to
today's hardcoded defaults unchanged.
Records the design for drop-in, data-driven workflows/labels/actions:
YAML playbooks as pure orchestration data over four typed logic
positions (Workflow/Module/Channel/Forge), go:generate-driven schemas,
and load-time collision handling (detect+log+report, no auto-arbitration).
Flags execution-time idempotency and mid-run failure handling as
unresolved gaps to close before Channel/Forge or multi-action playbooks
ship.
Use @testing-library/preact rendered under jsdom (registered via
test/register.js) so the Post-Preact .jsx components and pages are
exercised through the real automatic-runtime render path instead of the
legacy el() DOM-helper API the tests were written against.
- Add jsdom + @testing-library/preact dev deps and a jsdom globals setup
in ui/test/register.js (window/document/navigator/getComputedStyle/...).
- Switch the .jsx loader hook to the automatic JSX runtime to match
@preact/preset-vite, so source files that shadow h (mapping-editor) and
Fragment/children arrays work exactly as in the Vite build.
- Migrate captures, config-row, mappings, settings-update-status,
task-logs, settings-lifecycle, settings-schema, tasks-actions and the
chat-app tests to render the Preact components and query the DOM via
testing-library.
- Fix a real render bug in tasks.jsx: <h.Fragment> is not rendered by the
automatic runtime (rows came out as [object Object]); use the imported
<Fragment> instead, matching the other migrated modules.
append(nonce, sealed...) appends to a slice initialized with a non-zero
length, which makezero flags. Build the nonce||ciphertext||tag payload with
an explicit buffer sized upfront instead.
Found by golangci-lint.
RedactPayload only redacted values under a fixed set of sensitive key
names, so a sender that names a secret field something else leaked it into
captured_events.body. Harden the heuristic:
- broaden the key-name markers (compound names like access_token,
client_secret, signing_key, x_api_key, webhook_secret, refresh_token)
and keep gateway.sensitiveParameterKey identical to preserve the
documented agreement between the two redaction paths.
- add value-shape detection: a compact JWT or a PEM private-key block is
redacted under any key, catching the 'sender named the field something
the heuristic misses' gap.
- keep it conservative so schema-by-example field mapping still works:
only unambiguous shapes (eyJ-prefixed JWTs, PEM key blocks) are
redacted by value, never ordinary content.
Best-effort per docs/prds/webhook-intake-security.md point 5.
Refs archie-core-t2db (captured_events.body redaction)
binding.Binding.Secret was persisted as plaintext in the bindings.secret
column, so anyone with the SQLite file saw sender-side HMAC secrets. Seal
it with AES-256-GCM transparently inside the store: encrypt-on-write,
decrypt-on-read.
- cipher: AES-256-GCM, 12-byte random nonce, SHA-256-normalised 32-byte
key resolved through the secret registry ([bindings].encryption_key).
- envelope 'arcie-binding:v1:<fingerprint>:<b64(nonce||ct||tag)>' so a
future cipher/KDF change is a version bump and old rows stay readable.
- rotation via previous_encryption_keys; key identity is the material's
SHA-256 fingerprint embedded in each row.
- legacy plaintext rows written before a key was configured stay readable;
encryption is not retroactive.
- nil cipher (no key configured) preserves the pre-t2db.7 plaintext path.
Deferred: captured_events.body redaction upgrade (separate concern, see
docs/prds/binding-secret-encryption.md).
Refs archie-core-t2db.7
Implements archie-core-t2db.4: the runtime-editable binding entity that
turns a captured webhook into an archie task, plus the per-source HMAC
verification at handleCapture that makes t2db.5's 'unauthenticated event
cannot trigger a binding' invariant structurally enforceable.
Captures, mappings and bindings are now separate concerns on the same
single *store.Store; the new BindingStore / BindingDispatcher /
BindingTaskCreator split keeps each interface under the interfacebloat
limit (8 methods).
State machine: draft -> pending_approval -> armed; any edit on an armed
binding drops it back to pending_approval, enforced in SQL via
status='pending_approval' on UPDATE so the rule cannot be bypassed by a
direct status field in the request body. Approve is the only sanctioned
transition into armed (WHERE status='pending_approval' guard).
Overlap: two bindings may not share a source in any status; enforced at
InsertBinding and UpdateBinding (transaction-local SELECT). Approve has
a separate TOCTOU guard so a race between Insert and Approve cannot
// bypass the check.
HMAC at handleCapture: reads X-Hub-Signature-256 (then X-Signature-256)
// fallback, verifies via webhookguard.VerifyHMAC against the binding's
// per-source secret, marks CapturedEvent.Authenticated=true on match.
// Captures with no armed binding, missing signature, or wrong signature
all persist as authenticated=false -- the dispatch loop's
binding.Matcher.Matches gate (requires authenticated) is what stops
them from spawning a task. Two armed bindings for one source returns
409 at capture time as a belt-and-braces TOCTOU guard.
Dispatch loop: added Daemon.dispatchBindings, called from both Cycle
and maintainAndDrain between poll and drain. Walks
captured_events where authenticated=1 AND source IN armed bindings
AND id NOT IN binding_dispatches, runs the binding's matcher, resolves
the mapping, enqueues a chat-style task with binding_id /
// binding_version provenance stamped in the same transaction as the
// row insert. The binding_dispatches ledger (composite PK on
(binding_id, capture_id)) is the at-most-once guarantee across cycles
// and daemon restarts.
Tasks schema migration: binding_id INTEGER NOT NULL DEFAULT 0 +
binding_version INTEGER NOT NULL DEFAULT 0 (taskSchemaVersion bumped
1 -> 2). Existing tasks keep 0 / 0.
Out of scope (documented follow-ups):
- secret encryption at rest (plaintext today)
- full dashboard HTML for the binding editor (CRUD API only this bead)
- per-binding rate limits (existing per-remote-address limit applies)
- binding.Owner / binding.Repo fields (dispatch falls back to the
single configured repo; multi-repo deployments log and skip)
Adds PATCH /api/config/repos/{owner}/{name}, a dedicated seam distinct
from the generic dotted-key PATCH /api/config path: a repository is
one element of []config.Repo, not a flat key. Traced the mechanism
before adding any new plumbing -- overlay.Nest/ApplyOverlayValues
already handle "repos" as a single whole-slice key with no dot, so
the fix is a webui handler plus a bootstrap seam that reads the
daemon's live, untrimmed Repos (never webui.RepoView, which omits
Preflight/TestGlob), mutates the one matched field via the pure
applyRepoFieldUpdate helper, and republishes through the existing
UpdateConfig(ctx, {"repos": repos}) path unchanged.
config-row.js's row() gains an opts.save override so an edit can be
redirected to a different persistence call. The repositories table
renders an autosaving checkbox for the two booleans and a
save-on-blur/Enter input for max_retries, via api.configRepoUpdate.
Closes archie-core-b6ew.6, and with it archie-core-b6ew.
TestConfigFieldDescriptorsRestartRequiredIsDeliberate pins the exact
RestartRequired value per field against the reload.go evidence
already documented in configFieldDescriptors' own comment, so a field
reclassified without re-checking reload.go fails loudly instead of
silently defaulting to "takes effect immediately."
ui/test/settings-schema.test.js renders settingsPage against a schema
fixture containing a field settings.js was never written to know
about, proving the renderer needs no field-specific branch to show it
correctly, and asserts by reading settings.js's own source that none
of the generically-rendered fields' keys appear literally in it --
the direct regression test for archie-core-b6ew.3.
The rest of this issue's scope (metadata completeness, structured/
locked non-editability, schema secret-leak guard) was already covered
incrementally while implementing archie-core-b6ew.1 through .4.
Closes archie-core-b6ew.5
RepoView.ReviewEnabled was previously absent from GET /api/config
entirely, not just unrendered; add it alongside AllowConcurrent and
MaxRetries. The repositories table gains Concurrent/Max retries/
Self-review columns as read-only pills -- this is the concrete
discoverability fix for "why isn't a second agent running": that
config was already reachable from the API, just never shown.
config.example.toml documents review_enabled, which had no example
entry before this.
Full inline editing of per-repo fields is out of scope here: the
dashboard's PATCH /api/config path has no array-index support for
updating one element of the Repos slice, which is separate,
real scope -- filed as archie-core-b6ew.6.
Closes archie-core-b6ew.4
settings.js drops identityCard/budgetsCard/storageCard/webCard/
pullPolicyLabel in favour of one schemaCards() that walks cfg.schema
and builds a card per section, a row per non-structured field --
label, type, description, editability and enum options all come from
the backend descriptor instead of a hardcoded row(...) call per key.
config-row.js gains: enum fields edit as a <select> from opts.options;
opts.editable === false renders read-only distinct from a locked row
(no reason to show, just no edit affordance); opts.hint carries a
field's description as the label's tooltip, so "0 means unlimited."
travels with the field instead of being baked into a display-value
string per key.
ConfigSection also gains Description, filled in per section to match
each card's existing sub-text, since the card's own explanation is
schema metadata too.
Structured sections (repositories, models & providers) are untouched
-- still the existing bespoke renderers, reserved for archie-core-b6ew.4.
Closes archie-core-b6ew.3
ConfigView.Schema carries the archie-core-b6ew.1 descriptor catalog
with each request's own values, locked reasons, and overridden
markers attached (buildConfigSchema), additive alongside the existing
flat fields so nothing that reads ConfigView today breaks.
Tests confirm schema values match their flat-field source of truth,
locked reasons propagate to the schema entry, structured fields stay
non-editable, and secrets never reach the schema block.
Closes archie-core-b6ew.2
Introduces ConfigField/ConfigSection and configFieldDescriptors(),
attaching key/label/type/editable/restart-required to every field
GET /api/config already exposes -- the data-independent half of the
schema contract from docs/prds/config-schema.md. RestartRequired is
sourced from reload.go's reloadableFields/reloadableSubFields
allowlist rather than guessed.
Not wired into the API response yet (archie-core-b6ew.2); this issue
is the catalog and its contract tests only.
Closes archie-core-b6ew.1
Field metadata (label, section, type, editability, restart-required)
currently lives only in settings.js/config-row.js, disjoint from the
backend's ConfigView allowlist -- adding or changing a runtime-tunable
setting means editing Go and JS by hand in two places with nothing to
catch drift. Repo.ReviewEnabled never reaches the API at all, and
AllowConcurrent/MaxRetries reach it but the repositories card never
renders them.
Decision: keep the existing secret-free ConfigView allowlist as the
safety boundary (no reflection over config.Config, which is already
scheduled for dissolution), and hand-author a descriptor per allowed
field so the frontend renders sections/fields generically instead of
hardcoding rows.
Filed as archie-core-b6ew (epic) with five dependency-ordered children.
session-memory's extracted actions never set Action.At, so the wire
carried time.Time's zero value ("0001-01-01") and the Curators
dashboard rendered it as "105694 wks ago". Stamp the action with the
curator's clock at the producer, and backfill any zero Action.At in
activityTracker.record from the pass's own timestamp so an engine
with no clock (skillcurator) can't hit the same bug.
Closes archie-core-z6wy
Persona/SOUL text was interpolated raw at the top of archie.md.tpl,
so a hostile SOUL could inject its own <core_rules> or
<instruction_precedence> tags ahead of the real ones. Render it
through the existing xml-escaping helper into a labeled
trust="data" <soul> block, and tell instruction_precedence
explicitly that the block is reference data, not an authority.
Closes archie-core-1786637490097-12-bf415ffb