feat(config): add state_dir for the daemon's host state
The embedded NATS store and endpoint file, the task-log registry and the readiness disk probe resolve from state_dir (default: the data home's archie directory) instead of the directory of db_path. db_path now only locates the legacy SQLite files for the one-time import and its boot gate.
This commit is contained in:
33 files changed
+92
-35
No files matched your search
@@ -327,11 +327,10 @@ func (b *boot) setupLogging() error {
|
||||
}
|
||||
logFeed := logging.NewFeed(1000)
|
||||
b.logFeed = logFeed
|
||||
// Task logs live alongside the store rather than under cfg.Log.File's
|
||||
// Task logs live in the state directory rather than under cfg.Log.File's
|
||||
// directory: cfg.Log.File is optional (file logging can be off), while
|
||||
// DBPath is required for the daemon to run at all, so it is the more
|
||||
// reliable anchor for "where archie keeps its state" on this host.
|
||||
taskLogs := logging.NewTaskRegistry(filepath.Join(filepath.Dir(cfg.DBPath), "logs", "tasks"), logFeed, logging.TaskSinkOptions{})
|
||||
// state_dir always resolves.
|
||||
taskLogs := logging.NewTaskRegistry(filepath.Join(cfg.StateDir, "logs", "tasks"), logFeed, logging.TaskSinkOptions{})
|
||||
b.taskLogs = taskLogs
|
||||
fileLog, logCloser, logErr := logging.New(logging.Options{
|
||||
File: cfg.Log.File,
|
||||
@@ -519,7 +518,7 @@ func (b *boot) connectNATS(ctx context.Context) error { //nolint:nestif // embed
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
endpoint, readErr := readEmbeddedNATSEndpoint(cfg.DBPath)
|
||||
endpoint, readErr := readEmbeddedNATSEndpoint(cfg.StateDir)
|
||||
if readErr == nil {
|
||||
url, natsToken = endpoint.URL, endpoint.Token
|
||||
if probe, err := nats.Connect(ctx, nats.Config{URL: url, Token: natsToken, Subjects: []string{workintake.SubjectTaskWildcard}, FilterSubject: workintake.SubjectTaskWildcard}, log); err == nil {
|
||||
@@ -603,7 +602,7 @@ func (b *boot) startEmbeddedNATS(ctx context.Context) (string, string, error) {
|
||||
}
|
||||
srv, err := nats.StartEmbedded(ctx, nats.EmbeddedOptions{
|
||||
Host: host,
|
||||
StoreDir: filepath.Join(filepath.Dir(cfg.DBPath), "nats"),
|
||||
StoreDir: filepath.Join(cfg.StateDir, "nats"),
|
||||
}, log)
|
||||
if err != nil {
|
||||
log.Error("embedded nats start failed", "err", err)
|
||||
@@ -611,7 +610,7 @@ func (b *boot) startEmbeddedNATS(ctx context.Context) (string, string, error) {
|
||||
}
|
||||
b.addCleanup(func() { srv.Shutdown() })
|
||||
log.Info("embedded nats started", "url", srv.ClientURL())
|
||||
if err := writeEmbeddedNATSEndpoint(cfg.DBPath, srv.ClientURL(), srv.Token()); err != nil {
|
||||
if err := writeEmbeddedNATSEndpoint(cfg.StateDir, srv.ClientURL(), srv.Token()); err != nil {
|
||||
srv.Shutdown()
|
||||
return "", "", err
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ func RunGateway(ctx context.Context, options GatewayOptions) error {
|
||||
nc, err = natsio.Connect(url, natsio.Token(token))
|
||||
} else {
|
||||
var endpoint embeddedNATSEndpoint
|
||||
endpoint, err = readEmbeddedNATSEndpoint(b.cfg.DBPath)
|
||||
endpoint, err = readEmbeddedNATSEndpoint(b.cfg.StateDir)
|
||||
if err == nil {
|
||||
url, token = endpoint.URL, endpoint.Token
|
||||
nc, err = natsio.Connect(url, natsio.Token(token))
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{"url":"nats://127.0.0.1:42009","token":"PXDPQYX3SBCBW6MNZTUSB5LNDW"}
|
||||
@@ -0,0 +1 @@
|
||||
{"Created":"2026-09-24T04:45:55.407149438Z","name":"ARCHIE_REACTIONS","subjects":["archie.reaction.\u003e"],"retention":"limits","max_consumers":-1,"max_msgs":-1,"max_bytes":-1,"max_age":86400000000000,"max_msgs_per_subject":-1,"max_msg_size":-1,"discard":"old","storage":"file","num_replicas":1,"duplicate_window":120000000000,"compression":"none","allow_direct":false,"mirror_direct":false,"sealed":false,"deny_delete":false,"deny_purge":false,"allow_rollup_hdrs":false,"consumer_limits":{},"allow_msg_ttl":false,"metadata":{"_nats.req.level":"0"}}
|
||||
@@ -0,0 +1 @@
|
||||
e5007a6989578acf
|
||||
Binary file not shown.
+1
@@ -0,0 +1 @@
|
||||
{"Created":"2026-09-24T04:46:09.06756232Z","Name":"archie-daemon","durable_name":"archie-daemon","name":"archie-daemon","deliver_policy":"all","ack_policy":"explicit","ack_wait":300000000000,"max_deliver":3,"filter_subject":"archie.reaction.\u003e","replay_policy":"instant","max_waiting":512,"max_ack_pending":1000,"inactive_threshold":86400000000000,"num_replicas":0,"metadata":{"_nats.req.level":"0"}}
|
||||
+1
@@ -0,0 +1 @@
|
||||
d87c12a35c167265
|
||||
BIN
Binary file not shown.
@@ -0,0 +1 @@
|
||||
{"Created":"2026-09-24T04:46:09.078999729Z","Name":"s3Z87297","name":"s3Z87297","deliver_policy":"all","ack_policy":"explicit","ack_wait":30000000000,"max_deliver":-1,"filter_subject":"archie.reaction.\u003e","replay_policy":"instant","max_waiting":512,"max_ack_pending":1000,"num_replicas":0,"metadata":{"_nats.req.level":"0"}}
|
||||
@@ -0,0 +1 @@
|
||||
8f8b6852faee5da4
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
{"Created":"2026-09-24T04:46:09.079549283Z","Name":"sg9Gl4th","name":"sg9Gl4th","deliver_policy":"all","ack_policy":"explicit","ack_wait":30000000000,"max_deliver":-1,"filter_subject":"archie.reaction.\u003e","replay_policy":"instant","max_waiting":512,"max_ack_pending":1000,"num_replicas":0,"metadata":{"_nats.req.level":"0"}}
|
||||
@@ -0,0 +1 @@
|
||||
3c91a932fe817389
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
{"Created":"2026-09-24T04:45:55.396149543Z","name":"ARCHIE_TASKS","subjects":["archie.task.\u003e"],"retention":"workqueue","max_consumers":-1,"max_msgs":-1,"max_bytes":-1,"max_age":0,"max_msgs_per_subject":-1,"max_msg_size":-1,"discard":"old","storage":"file","num_replicas":1,"duplicate_window":120000000000,"compression":"none","allow_direct":false,"mirror_direct":false,"sealed":false,"deny_delete":false,"deny_purge":false,"allow_rollup_hdrs":false,"consumer_limits":{},"allow_msg_ttl":false,"metadata":{"_nats.req.level":"0"}}
|
||||
@@ -0,0 +1 @@
|
||||
c93aec38b44ea7d3
|
||||
Whitespace-only changes.
@@ -0,0 +1 @@
|
||||
{"Created":"2026-09-24T04:46:09.068004189Z","Name":"archie-daemon","durable_name":"archie-daemon","name":"archie-daemon","deliver_policy":"all","ack_policy":"explicit","ack_wait":300000000000,"max_deliver":3,"filter_subject":"archie.task.\u003e","replay_policy":"instant","max_waiting":512,"max_ack_pending":1000,"inactive_threshold":86400000000000,"num_replicas":0,"metadata":{"_nats.req.level":"0"}}
|
||||
@@ -0,0 +1 @@
|
||||
514bef62122c4381
|
||||
Binary file not shown.
@@ -12,12 +12,12 @@ type embeddedNATSEndpoint struct {
|
||||
Token string `json:"token"`
|
||||
}
|
||||
|
||||
func embeddedNATSEndpointPath(dbPath string) string {
|
||||
return filepath.Join(filepath.Dir(dbPath), "nats", "endpoint.json")
|
||||
func embeddedNATSEndpointPath(stateDir string) string {
|
||||
return filepath.Join(stateDir, "nats", "endpoint.json")
|
||||
}
|
||||
|
||||
func writeEmbeddedNATSEndpoint(dbPath, url, token string) error {
|
||||
path := embeddedNATSEndpointPath(dbPath)
|
||||
func writeEmbeddedNATSEndpoint(stateDir, url, token string) error {
|
||||
path := embeddedNATSEndpointPath(stateDir)
|
||||
data, err := json.Marshal(embeddedNATSEndpoint{URL: url, Token: token})
|
||||
if err != nil {
|
||||
return fmt.Errorf("marshal embedded NATS endpoint: %w", err)
|
||||
@@ -48,8 +48,8 @@ func writeEmbeddedNATSEndpoint(dbPath, url, token string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func readEmbeddedNATSEndpoint(dbPath string) (embeddedNATSEndpoint, error) {
|
||||
data, err := os.ReadFile(embeddedNATSEndpointPath(dbPath))
|
||||
func readEmbeddedNATSEndpoint(stateDir string) (embeddedNATSEndpoint, error) {
|
||||
data, err := os.ReadFile(embeddedNATSEndpointPath(stateDir))
|
||||
if err != nil {
|
||||
return embeddedNATSEndpoint{}, err
|
||||
}
|
||||
|
||||
@@ -7,18 +7,21 @@ import (
|
||||
)
|
||||
|
||||
func TestEmbeddedNATSEndpointRoundTripIsPrivateAndAtomic(t *testing.T) {
|
||||
dbPath := filepath.Join(t.TempDir(), "archie.db")
|
||||
if err := writeEmbeddedNATSEndpoint(dbPath, "nats://127.0.0.1:4222", "secret"); err != nil {
|
||||
stateDir := t.TempDir()
|
||||
if err := writeEmbeddedNATSEndpoint(stateDir, "nats://127.0.0.1:4222", "secret"); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
got, err := readEmbeddedNATSEndpoint(dbPath)
|
||||
got, err := readEmbeddedNATSEndpoint(stateDir)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if got.URL != "nats://127.0.0.1:4222" || got.Token != "secret" {
|
||||
t.Fatalf("endpoint = %+v", got)
|
||||
}
|
||||
info, err := os.Stat(embeddedNATSEndpointPath(dbPath))
|
||||
if want := filepath.Join(stateDir, "nats", "endpoint.json"); embeddedNATSEndpointPath(stateDir) != want {
|
||||
t.Fatalf("endpoint path = %q, want %q", embeddedNATSEndpointPath(stateDir), want)
|
||||
}
|
||||
info, err := os.Stat(embeddedNATSEndpointPath(stateDir))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -73,12 +72,12 @@ func diskProbeTargets(cfg config.Config) []readiness.DiskTarget {
|
||||
return targets
|
||||
}
|
||||
|
||||
// diskProbePath preserves the database/work/cwd fallback used by the daemon's
|
||||
// disk target: the store database directory first, then work directory, then cwd.
|
||||
// diskProbePath is the daemon's data disk target: the state directory first,
|
||||
// then the work directory, then cwd.
|
||||
func diskProbePath(cfg config.Config) string {
|
||||
switch {
|
||||
case cfg.DBPath != "":
|
||||
return filepath.Dir(cfg.DBPath)
|
||||
case cfg.StateDir != "":
|
||||
return cfg.StateDir
|
||||
case cfg.WorkDir != "":
|
||||
return cfg.WorkDir
|
||||
default:
|
||||
|
||||
@@ -12,15 +12,15 @@ import (
|
||||
"github.com/samcharles93/archie-core/internal/webui"
|
||||
)
|
||||
|
||||
func TestDiskProbePath_PrefersDBPath(t *testing.T) {
|
||||
cfg := config.Config{DBPath: "/data/archie/tasks.db", WorkDir: "/srv/archie"}
|
||||
if got := diskProbePath(cfg); got != "/data/archie" {
|
||||
t.Fatalf("diskProbePath = %q, want /data/archie", got)
|
||||
func TestDiskProbePath_PrefersStateDir(t *testing.T) {
|
||||
cfg := config.Config{StateDir: "/var/lib/archie", DBPath: "/data/archie/tasks.db", WorkDir: "/srv/archie"}
|
||||
if got := diskProbePath(cfg); got != "/var/lib/archie" {
|
||||
t.Fatalf("diskProbePath = %q, want /var/lib/archie", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestDiskProbePath_FallsBackToWorkDir(t *testing.T) {
|
||||
cfg := config.Config{WorkDir: "/srv/archie"}
|
||||
cfg := config.Config{DBPath: "/data/archie/tasks.db", WorkDir: "/srv/archie"}
|
||||
if got := diskProbePath(cfg); got != "/srv/archie" {
|
||||
t.Fatalf("diskProbePath = %q, want /srv/archie", got)
|
||||
}
|
||||
|
||||
@@ -232,9 +232,7 @@ func (b *boot) stateStoreDeps(grants *staterpc.TaskGrants) staterpc.Deps {
|
||||
// Task logs live in the state directory, which this process owns, and the
|
||||
// dashboard process owns no such directory -- so this is where a task-log
|
||||
// read is served from (docs/prds/ui-service-boundary.md). The reader is
|
||||
// the daemon's own registry, built over the same state-directory
|
||||
// derivation this process uses for its SQLite file; both resolve from the
|
||||
// same configured DBPath, so they agree on where archie keeps its state.
|
||||
// the daemon's own registry over the configured state_dir.
|
||||
//
|
||||
// The nil check is on the registry, not on the interface it is assigned
|
||||
// to: a nil *logging.TaskRegistry stored in this field produces a non-nil
|
||||
|
||||
@@ -486,7 +486,14 @@ type Config struct {
|
||||
// SecretEngineDir contains Yaegi secret-engine plugins. Built-in env and
|
||||
// bws engines remain available when this is empty.
|
||||
SecretEngineDir string `toml:"secret_engine_dir" yaml:"secret_engine_dir"`
|
||||
DBPath string `toml:"db_path" yaml:"db_path"`
|
||||
// DBPath locates the legacy SQLite files ("<db_path>-tasks.sqlite",
|
||||
// "-eda.sqlite", "-conversations.sqlite") for the one-time import and the
|
||||
// boot gate that refuses to serve until it has run. Nothing else reads it.
|
||||
DBPath string `toml:"db_path" yaml:"db_path"`
|
||||
// StateDir is the host directory archie keeps non-database state in: the
|
||||
// embedded NATS store and its endpoint file, the task-log registry, and
|
||||
// the readiness disk probe's data target. Bootstrap-only.
|
||||
StateDir string `toml:"state_dir" yaml:"state_dir"`
|
||||
// DatabaseURL is the PostgreSQL connection URL the standalone State Store
|
||||
// process opens at boot. It is bootstrap-only (the same class as db_path
|
||||
// and work_dir): the pool is opened once, so a runtime change cannot take
|
||||
|
||||
@@ -225,6 +225,7 @@ func (l *Loader) applyGeneralDefaults(cfg *config.Config) {
|
||||
cfg.SecretEngineDir = expandHomePath(cfg.SecretEngineDir)
|
||||
cfg.WorkDir = expandHomePath(cfg.WorkDir)
|
||||
cfg.DBPath = expandHomePath(cfg.DBPath)
|
||||
cfg.StateDir = expandHomePath(cfg.StateDir)
|
||||
cfg.Chat.Workspace = expandHomePath(cfg.Chat.Workspace)
|
||||
// DatabaseURL has no default and is not path-expanded: it is a connection
|
||||
// URL, not a file path. Empty means "not configured", which the State
|
||||
@@ -237,6 +238,9 @@ func (l *Loader) applyGeneralDefaults(cfg *config.Config) {
|
||||
if cfg.DBPath == "" {
|
||||
cfg.DBPath = filepath.Join(l.dataHome(), "archie", "archie.db")
|
||||
}
|
||||
if cfg.StateDir == "" {
|
||||
cfg.StateDir = filepath.Join(l.dataHome(), "archie")
|
||||
}
|
||||
if cfg.PollInterval == 0 {
|
||||
cfg.PollInterval = config.Duration(defaultPollInterval)
|
||||
}
|
||||
|
||||
@@ -11,5 +11,6 @@ package configuration
|
||||
var DeniedKeys = map[string]string{
|
||||
"db_path": "required for bootstrap; cannot be changed at runtime",
|
||||
"database_url": "required for bootstrap; cannot be changed at runtime",
|
||||
"state_dir": "required for bootstrap; cannot be changed at runtime",
|
||||
"work_dir": "pins the daemon's working layout; cannot be changed at runtime",
|
||||
}
|
||||
@@ -76,6 +76,7 @@ func TestLoadExpandsConfiguredHomePaths(t *testing.T) {
|
||||
bot_user = "widget"
|
||||
work_dir = "~/archie/work"
|
||||
db_path = "~/archie/archie.db"
|
||||
state_dir = "~/archie/state"
|
||||
|
||||
[chat]
|
||||
workspace = "~/archie/workspace"
|
||||
@@ -98,6 +99,7 @@ name = "app"
|
||||
}{
|
||||
"work_dir": {got: cfg.WorkDir, want: filepath.Join(home, "archie", "work")},
|
||||
"db_path": {got: cfg.DBPath, want: filepath.Join(home, "archie", "archie.db")},
|
||||
"state_dir": {got: cfg.StateDir, want: filepath.Join(home, "archie", "state")},
|
||||
"chat.workspace": {got: cfg.Chat.Workspace, want: filepath.Join(home, "archie", "workspace")},
|
||||
}
|
||||
for name, tt := range wants {
|
||||
@@ -109,6 +111,32 @@ name = "app"
|
||||
}
|
||||
}
|
||||
|
||||
// state_dir defaults to archie's directory under the data home, independent
|
||||
// of db_path, which only locates legacy files for the one-time import.
|
||||
func TestStateDirDefaultsToTheDataHome(t *testing.T) {
|
||||
dataHome := t.TempDir()
|
||||
t.Setenv("XDG_DATA_HOME", dataHome)
|
||||
path := filepath.Join(t.TempDir(), "config.toml")
|
||||
contents := `
|
||||
bot_user = "widget"
|
||||
db_path = "/elsewhere/archie.db"
|
||||
|
||||
[[repos]]
|
||||
owner = "acme"
|
||||
name = "app"
|
||||
`
|
||||
if err := os.WriteFile(path, []byte(contents), 0o600); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
cfg, err := loadFile(path)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if want := filepath.Join(dataHome, "archie"); cfg.StateDir != want {
|
||||
t.Fatalf("StateDir = %q, want %q", cfg.StateDir, want)
|
||||
}
|
||||
}
|
||||
|
||||
func TestResolveSelectsFileFormatsAndDirectories(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
|
||||
@@ -242,6 +242,7 @@ type BudgetsView struct {
|
||||
// secrets.
|
||||
type StorageView struct {
|
||||
WorkDir string `json:"work_dir"`
|
||||
StateDir string `json:"state_dir"`
|
||||
DBPath string `json:"db_path"`
|
||||
DatabaseURL string `json:"database_url"`
|
||||
SkillsDir string `json:"skills_dir,omitempty"`
|
||||
@@ -375,6 +376,7 @@ func BuildConfigView(in ConfigViewInput) ConfigView {
|
||||
},
|
||||
Storage: StorageView{
|
||||
WorkDir: cfg.WorkDir,
|
||||
StateDir: cfg.StateDir,
|
||||
DBPath: cfg.DBPath,
|
||||
DatabaseURL: cfg.DatabaseURL,
|
||||
SkillsDir: cfg.SkillsDir,
|
||||
|
||||
@@ -147,7 +147,8 @@ func configFieldDescriptors() []ConfigSection {
|
||||
Description: "Where archied keeps its state, and how it isolates task execution.",
|
||||
Fields: []ConfigField{
|
||||
{Key: "work_dir", Label: "Work directory", Type: FieldString, Editable: false},
|
||||
{Key: "db_path", Label: "State path prefix", Type: FieldString, Editable: false},
|
||||
{Key: "state_dir", Label: "State directory", Description: "Embedded NATS store, task logs and the readiness disk probe.", Type: FieldString, Editable: false},
|
||||
{Key: "db_path", Label: "Legacy SQLite path prefix", Description: "Locates pre-PostgreSQL files for the one-time import only.", Type: FieldString, Editable: false},
|
||||
{Key: "database_url", Label: "PostgreSQL URL", Description: "The State Store's database connection; set at boot, restart required.", Type: FieldString, Editable: false},
|
||||
{Key: "skills_dir", Label: "Shared skills directory", Description: "Empty uses the work directory.", Type: FieldString, Editable: true, RestartRequired: true},
|
||||
{Key: "plugin_dir", Label: "Daemon plugin directory", Description: "Empty means no daemon plugins.", Type: FieldString, Editable: true, RestartRequired: true},
|
||||
@@ -192,6 +193,7 @@ func configFieldValues(view ConfigView) map[string]any {
|
||||
"budgets.wall_clock": view.Budgets.WallClock,
|
||||
"budgets.gate_max_failures": view.Budgets.GateMaxFailures,
|
||||
"work_dir": view.Storage.WorkDir,
|
||||
"state_dir": view.Storage.StateDir,
|
||||
"db_path": view.Storage.DBPath,
|
||||
"database_url": view.Storage.DatabaseURL,
|
||||
"skills_dir": view.Storage.SkillsDir,
|
||||
|
||||
@@ -64,7 +64,7 @@ func TestConfigFieldDescriptorsAreComplete(t *testing.T) {
|
||||
"bot_user", "bot_email", "label", "forge.type", "forge.host", "diff_cap_lines",
|
||||
"repos", "models", "providers",
|
||||
"budgets.max_steps", "budgets.wall_clock", "budgets.gate_max_failures",
|
||||
"work_dir", "db_path", "database_url", "skills_dir", "plugin_dir", "secret_engine_dir",
|
||||
"work_dir", "state_dir", "db_path", "database_url", "skills_dir", "plugin_dir", "secret_engine_dir",
|
||||
"containers.image", "containers.max_concurrency", "containers.max_uptime",
|
||||
"containers.volume_ttl", "containers.pull_policy", "containers.network",
|
||||
"web.listen",
|
||||
@@ -100,6 +100,7 @@ func TestConfigFieldDescriptorsRestartRequiredIsDeliberate(t *testing.T) {
|
||||
"budgets.wall_clock": false,
|
||||
"budgets.gate_max_failures": false,
|
||||
"work_dir": false, // locked, not merely restart-required
|
||||
"state_dir": false, // locked, not merely restart-required
|
||||
"db_path": false, // locked, not merely restart-required
|
||||
"database_url": false, // locked, not merely restart-required
|
||||
"skills_dir": true, // absent from reloadableFields
|
||||
@@ -149,7 +150,7 @@ func TestConfigFieldDescriptorsStructuredFieldsAreNotEditable(t *testing.T) {
|
||||
// renderer does not need runtime state to know not to offer an edit
|
||||
// affordance for a key that can never succeed.
|
||||
func TestConfigFieldDescriptorsLockedStorageFieldsAreNotEditable(t *testing.T) {
|
||||
locked := map[string]bool{"work_dir": true, "db_path": true, "database_url": true}
|
||||
locked := map[string]bool{"work_dir": true, "state_dir": true, "db_path": true, "database_url": true}
|
||||
for _, section := range configFieldDescriptors() {
|
||||
for _, f := range section.Fields {
|
||||
if locked[f.Key] && f.Editable {
|
||||
|
||||
Reference in new issue
Block a user