Skip to content

clean: the D-STORE-7 store budget is not project-tunable (needs a spec defaults: field) #28

Closed

Description

@aitrawog

The D-STORE-7 size budget is authored in the PLUGIN's schema only — a project cannot tune it

charly clean --store measures the charly image store against a size budget, and per SDD the
budget is an AUTHORED value rather than a Go constant: candy/plugin-clean/schema/clean.cue
#CleanPlugin.store_budget.bytes (32 GiB).

That is the right home for the DEFAULT and the wrong home for the only place an operator can
write a value down. defaults: in a project's charly.yml is where every other retention
tunable lives (keep_images, keep_check_runs), and it is read by
sdk/loaderkit.ResolveRetentionDefaultsViaExecutor from the SHARED #Defaults in
opencharly/spec. The budget is not a field there, so a project cannot say "8 GiB on the laptop,
200 GiB on the build host" — the plugin's own default is the only value every host gets.

What the fix needs (cross-repo, hence this issue)

  1. opencharly/spec: a defaults: field (e.g. clean_store_budget, bytes, > 0, absent =
    the plugin default) on the retention defaults shape, with the CUE as the source.
  2. opencharly/sdk: extend ResolveRetentionDefaultsViaExecutor's reply so the resolved budget
    travels beside keep_images/keep_check_runs (the resolver already returns both; the budget
    is the third tunable of the same category).
  3. opencharly/plugin-clean: prefer the resolved value when present, keep the schema value as the
    declared default, and report WHICH of the two it used.

Absent this, the sweep is honest about the number it used (store budget: retained 1.0 KiB of 32.0 GiB), so nothing is silent — which is why this is filed rather than blocking: a change
cannot be held for a cross-repo schema field it correctly declares as its own default.

Agent: clean-retention

Activity

  1. aitrawog commented on Nov 18, 2026

    @aitrawog
    ContributorAuthor

    STATUS — in flight again, with the home now settled by the operator: the ceiling is a local machine
    setting, not a project one.

    The disposition changed twice and is now final:

    1. Not a project defaults: field. That was the first shape; the operator's requirement is a
      machine-scoped ceiling, and defaults: in a project is not the machine.
    2. Not a plugin-wide constant either — the shipped #CleanPlugin.store_budget (32 GiB) stays as
      the fallback only.
    3. The home is ~/.config/charly/charly.yml, the per-host configuration (D-STORE-2), as a
      declared section — clean: { store_budget: { bytes } } beside cache:/ledger:/deploy:/
      system:. bytes is int & >0 with @go(Bytes, type=int64) (256 GiB is 274877906944, which
      overflows a 32-bit int silently on 386/arm). Absent → exactly 32 GiB; authored → the authored
      number; the report names the provenance (… of 256.0 GiB (user config) vs … of 32.0 GiB (plugin default)).

    Chain: spec (the section field — the Lead's leg, in flight) → sdk (pin bump; no API change,
    because loaderkit.LoadDeployConfigViaExecutor already returns the struct the new field arrives on) →
    this repo → charly pins. I am waiting for the spec tag.

    Filed while waiting: opencharly/spec#383 — §4.6's get config op ("the caller's own
    user-configuration section") is implemented nowhere, and the loader every plugin actually uses hands
    over the WHOLE per-host file, so any plugin can read cache:, ledger:, deploy: and every future
    section. The knob reads through that loader today; the narrowing is tracked there and does not block it.

    Agent: clean-retention
    Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)

  2. aitrawog commented on Nov 18, 2026

    @aitrawog
    ContributorAuthor

    RESOLVED — implemented in #33 (branch feat/clean-store-budget-usercfg, head
    4e9fab9), which closes this issue on merge.

    The requirement, as finally specified by the operator: the store ceiling is a local machine
    setting, not a per-project one. So the home is the per-host user configuration
    (~/.config/charly/charly.yml, D-STORE-2), as a declared section:

    clean:
      store_budget:
        bytes: 274877906944      # 256 GiB

    The section is declared in opencharly/spec#384 (#CleanSection / #StoreBudget, bytes: int & >0
    projected as int64); plugin-clean reads it through loaderkit.LoadDeployConfigViaExecutor and keeps
    its own 32 GiB #CleanPlugin.store_budget as the fallback. Three states, never a sentinel: absent
    (nil at every level) → 32 GiB; authored positive → that number; unreadable or authored non-positive →
    REFUSE, naming the file — because a parse failure must never evict a machine's builds under a ceiling it
    never wrote. The report names the provenance (ceiling: user config / ceiling: plugin default).

    The two earlier shapes this issue was almost given are recorded for the next reader: a project
    defaults: field (wrong — a project is not the machine) and a plugin-wide constant (wrong — that was
    the thing being made configurable). --store now requires compiled-in placement, because the
    configuration is read over the reverse channel.

    One narrowing is still owed and filed separately: opencharly/spec#383 (§4.6's get config promises the
    caller its OWN section; the loader the tree provides hands over the whole per-host file).

    Agent: clean-retention
    Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)

  3. aitrawog commented on Nov 18, 2026

    @aitrawog
    ContributorAuthor

    STATUS — implemented in #34 (branch feat/clean-store-budget-usercfg, head
    c5ae3d3), which closes this issue on merge. #33 was auto-closed at the validator's threshold after its
    findings were fixed; #34 is the successor on the same branch and head.

    The ceiling is the machine's, authored in the per-host user configuration
    (~/.config/charly/charly.yml: clean: {store_budget: {bytes: 274877906944}}), read through
    loaderkit.LoadHostCleanSectionViaExecutor (sdk#566) and reported with its provenance. Three executed
    arms on a charly tree wired to the branch:

    g256   -> … of 256.0 GiB (ceiling: user config)
    zero   -> charly: error: … `clean.store_budget.bytes: 0`, which is not a positive ceiling — refusing to fall back
    plain  -> … of 32.0 GiB (ceiling: plugin default)
    

    Getting there found a real producer gap, now closed: no plugin-reachable loader returned the per-host
    clean: section (deploykit.ProjectDeployConfig drops unnamed sections; UnifiedFile.Clean was nil for
    the same documents), filed as sdk#565 and fixed by sdk#566. The plugin's own
    #CleanPlugin.store_budget (32 GiB) remains the fallback only, and --store requires compiled-in
    placement because the configuration is read over the reverse channel.

    Agent: clean-retention
    Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)

  4. aitrawog commented on Nov 18, 2026

    @aitrawog
    ContributorAuthor

    STATUS — head moved to 56f956d on #34 (the rename sweep + an empty commit to re-fire the gate). The gate itself is not scheduling: zero check-runs exist for 4df6109 and 56f956d despite a push, a reopen and a second push, while the trigger list is opened/synchronize/reopened. Escalated. Nothing in the code is outstanding.

  5. aitrawog commented on Nov 18, 2026

    @aitrawog
    ContributorAuthor

    RESOLVED — landed as opencharly/plugin-clean#34, merged at 450cf6a7e6be3e5029e3d1c7390d655d5a4342aa and tagged
    v2026.322.1959.

    The store ceiling is now the machine's, authored in the per-host user configuration
    (~/.config/charly/charly.yml):

    clean:
      store_budget:
        bytes: 274877906944      # 256 GiB

    bytes is int & >0, projected as int64. The plugin's own #CleanPlugin.store_budget (32 GiB) is the
    fallback for a machine that authors nothing, and the report names which applied
    (ceiling: user config / ceiling: plugin default). Three states, never a sentinel: absent → 32 GiB;
    authored positive → that number; unreadable or authored non-positive → refuse, naming the file.

    The three executed arms on a charly tree wired to the branch:

    g256   -> … of 256.0 GiB (ceiling: user config)
    zero   -> charly: error: … `clean.store_budget.bytes: 0`, which is not a positive ceiling — refusing to fall back
    plain  -> … of 32.0 GiB (ceiling: plugin default)
    

    Two producer gaps were found and closed on the way, and both were found by executing the path rather than
    by any green gate: opencharly/sdk#565/#566 (no plugin-reachable loader returned the per-host section —
    ProjectDeployConfig drops unnamed sections) and opencharly/charly#1206 (the bed has no --store step,
    so it cannot clear a change to this path; the arms are the evidence instead).

    Next step, outside this repo: the charly pin bump to v2026.322.1959, then the operator's --store run.

    Agent: clean-retention
    Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions