* Stop cook coercing non-whitelisted formula step types to task
stepTypeToIssueType had a hardcoded five-type switch whose default
branch silently turned every other step type — custom types like
"duty", but also built-ins like decision, spike, and story — into
task. Pass the type through with Normalize() instead, defaulting to
task only when the step type is empty.
No validation is added here: pour already registers non-built-in
types via ensureSubgraphCustomTypes and the storage layer validates
against types.custom, the same division of labor as bd create --type.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YLWg73gpPfwinj1jn3UhmU
* Fix custom-type registration gaps and honor declared parent step types
Review follow-ups to the cook/pour type passthrough (GH#5443):
- bd cook --persist now registers custom step types via
ensureSubgraphCustomTypes, matching the pour path
- doltTransaction.SetConfig syncs custom_types/custom_statuses tables so
in-transaction registration is visible to validation
- Wisp creation builds its validation BatchContext on regularTx (new
issueops.CreateIssuesInTxWithContext), so a custom type registered in
the same transaction validates on the dolt server backend
- Parent steps with a declared type keep it; only an undeclared type
defaults to epic
- Step types are trimmed before normalizing; types.custom is serialized
with json.Marshal; doctor's multirepo checks parse it JSON-first
- Registration gates on IsBuiltIn() so built-in types like event are not
churned into types.custom
- Regression test runs against a local dolt sql-server when the Docker
test container is unavailable
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YLWg73gpPfwinj1jn3UhmU
* Consolidate duplicated custom-type plumbing behind shared issueops helpers
Cleanup pass over the GH#5443 branch:
- Export issueops.ParseTypesConfigValue and point the doctor, domain/db,
template.go's comma-split hack, and config_helpers.go's own inline
copies at it instead of five parallel JSON-or-CSV parsers.
- Extract issueops.SyncConfigTables to own the config-key -> normalized
table mapping; all four SetConfig implementations now share it.
- Build one BatchContext per doltTransaction create call: hoisted above
the wisp/regular branch in CreateIssue, shared across both legs in
CreateIssues (drops 4 redundant config reads on mixed batches).
- CreateIssuesInTxWithContext sets SkipChildCounterReconcile on a
shallow copy so the caller's context is reusable.
- Retype ensureSubgraphCustomTypes as ensureCustomTypesForIssues taking
[]*types.Issue, removing cook's throwaway TemplateSubgraph wrapper.
- Rebuild setupLocalServerStore on the setupWispCascadeStore recipe:
t.Cleanup teardown and CreateIfMissing instead of hand-rolled
CREATE DATABASE / initSchemaOnDB / shelled dolt init.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YLWg73gpPfwinj1jn3UhmU
* Stop auto-registering formula custom types; flatten unregistered to task/epic
Pour and cook --persist no longer write step types into types.custom.
A step type that is neither built-in nor already registered is flattened
with a warning — to epic when the step has children (matching the
undeclared-parent default), task otherwise. Operators opt in with
bd config set types.custom before pouring; a typo'd step type can no
longer become a permanently registered custom type.
ensureCustomTypesForIssues (the read-merge-write into types.custom)
becomes flattenUnregisteredIssueTypes, reading types.custom through the
transaction plus config.yaml-declared types to match insert validation.
The now-unused molConfigWriter interface is gone.
Also lands the code-review fixes on the same plumbing:
- storeMolWriter.GetConfig routes through the bound transaction, fixing
out-of-tx config reads (lost-update window; MaxOpenConns=1 hang).
- doltTransaction.SetConfig invalidates DoltStore's config caches via
the shared invalidateConfigCaches, so long-lived processes stop
serving stale custom type/status sets.
- doctor's unknown-type check uses IsBuiltIn instead of a stale 6-type
hardcoded list that would have flagged spike/story/gate as unknown.
- schema backfill uses issueops.ParseTypesConfigValue (no import cycle;
the old copy kept untrimmed JSON elements).
- Dead EnsureCustomTypeInTx (misleading GH#3213 doc, wrote table-only
rows the sync invariant wipes) and dead GetCustomTypesTx deleted.
Step.Type docs updated and schema_gen.go regenerated via go generate.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YLWg73gpPfwinj1jn3UhmU
* Fold the last SetConfig path into SyncConfigTables; cleanups
Follow-up cleanup on the custom-types work.
EmbeddedDoltStore.SetConfig still carried the hand-rolled `switch key`
that the other four SetConfig paths replaced with SyncConfigTables, so
the helper's stated invariant — every SetConfig path keeps the
projection in step — had a hole. Route it through the helper, then
unexport syncCustomTypesTable/syncCustomStatusesTable: with no callers
left outside SyncConfigTables, the single-entry-point rule is enforced
by the compiler rather than by a comment.
Smaller cleanups alongside it:
- Drop linearConfigReader; it was the same single-method interface as
configReader, in the same package.
- flattenUnregisteredIssueTypes built three collections where one does
the job. Seed `unknown` directly and delete registered types, losing
the string/IssueType round-trip.
- Use WarnError instead of open-coding its Fprintf.
- processStepToIssue trimmed step.Type twice, once inside
stepTypeToIssueType and again for the epic default; hoist to one
declaredType so the two can't drift.
- Remove the `typesStr == ""` guard in readTypesFromDB, left behind
when its loop became ParseTypesConfigValue (which returns nil for
empty).
- Rename the BatchContext copy in CreateIssuesInTxWithContext from
`local` to `batch` instead of reassigning the parameter, so bc
provably stays the caller's pointer.
- Lead storeMolWriter.GetConfig's doc with the reason that still
applies (second pool connection deadlocks at MaxOpenConns=1); nothing
registers types in-transaction during pour any more.
No behavior change. gofmt, go vet, and the affected tests pass;
golangci-lint was not available locally.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YLWg73gpPfwinj1jn3UhmU
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>