Skip to content

test(atlas): cost-aware placement dry-run simulator (#6020 F04) #8528

Open

Description

@dezren39

F04 — cost-aware placement dry-run reference simulator

Tier/status: recommended; fixture-only work ready after design merge; operational use conditional. Parent #6020, programme #6018; design on main. Evidence: baseline V1-D06/D09/D13/D15, architecture, growth model #6061.

Scope and distinction

Create a pure offline scenario simulator for comparing a few synthetic placement choices under explicit quality, latency, allowed-location and plan-envelope constraints. Inputs include versioned synthetic meter rates and age/uncertainty, storage, sync, reads/writes, embedding, egress, local hardware, temporary export/restore/compaction headroom and measured-or-unknown quality/latency. Output itemizes units and computed ranges, infeasibility or unknown, and a reversible proposal only. No live pricing, provider bindings, autonomous movement/deletion, real corpus, credentials or external costs. Constraints are evaluated before cost: sensitivity, legal retention, rights and pinned heads are never overridden.

This is not #6061's churn × retention growth forecast, #6041's retention rule engine/dry-run reporter, #6058 embedding ledger, or #7969 live operations guardrails. Consume no runtime services. Routine retirement stays cold-before-retire; independently required source-rights purge is not delayed or converted to archival.

Failing-first steps and oracle

  1. Hand-calculate tiny scenarios in a documented unit ledger: e.g. two equal-quality choices with itemized metering, a faster feasible choice within envelope, a forbidden placement, missing price, and insufficient temporary space. Write expected outputs before simulator implementation.
  2. Implement a simple independently specified reference calculation. Model/property tests check determinism, nonnegative input validation, unit-preserving sums, monotonic cost for increased nonnegative use at fixed prices, hard-policy infeasibility even at zero cost, unknown propagation for missing measurements, and temporary headroom. An intentionally cheapest-first selector must fail a fixture where it violates the speed/quality or policy constraints.
  3. Emit proposal + assumptions/uncertainty; never execute it. Hysteresis and rollback are modeled as constraints/annotations only, not a control-plane decision.

Hard prerequisites: this merged design and local synthetic fixtures. Soft ordering: #6061 calibration, #6058 actual ledger, #6041 retention policy and #7969 headroom. Future integration needs observed meter units/prices and policy approvals and must be separately scoped; no claim of current prices or deployment.

Candidate seam: existing pkgs/atlas-search/crates/atlas-core/tests/ for an isolated placement_model.rs; existing growth model above is a design, not an executable dependency. Proposed future command: cargo test --manifest-path pkgs/atlas-search/Cargo.toml -p atlas-core --test placement_model. Use integer fixed units or documented precise arithmetic, not mixed currency/bytes.

Risks: unmeasured quality or stale rates cannot justify a placement; zero retrieval is not evidence of zero value. This simulation does not authorize purge, replace legal erasure, or prove operational savings.

Design merge gate

The reviewed design is in PR #8519. This tracker is filed now to preserve the independently buildable slice while the design PR waits on the unrelated basic-tier baseline defect #8306. Do not start implementation until #8519 is merged. The main-branch source links become available at that merge; this issue does not authorize production integration.

Activity

  1. developing-today commented on Nov 11, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Nov 11, 2026

    @dezren39
    MemberAuthor

    Filing / queue disposition — worker repo-worker-code

    Deliberately not queued in this pass. The commissioning constraint requires --worker repo-worker-code on every queue operation, but installed enqueue rejects that flag before writing. Omitting it is not authorized. This comment records the reason under the repository filing rule; it does not claim live queue coverage. #8519 must also merge before implementation starts (unrelated baseline blocker #8306).

    Complete triage packet for an authorized compatible enqueue surface / standing coverage reconciliation:

    {
      "title": "Triage #8528: Atlas F04 cost-aware placement dry-run simulator",
      "body": "Filed by task 14861 design mill; reviewed fixture-only slice. Preserve design merge gate #8519.",
      "queue": "repo-health-code-pilot",
      "priority": 30,
      "dedupe_key": "repo-health:v1:triage:developing-today/code:issue:8528",
      "payload": {
        "schema": "repo-task/v1",
        "kind": "triage",
        "repo": "developing-today/code",
        "queue": "repo-health-code-pilot",
        "issue": {
          "number": 8528,
          "url": "https://github.com/developing-today/code/issues/8528",
          "title": "test(atlas): cost-aware placement dry-run simulator (#6020 F04)",
          "state_checked_at": "2026-11-11T04:21:01.537192+00:00"
        },
        "problem": "Disposition Atlas F04 independently buildable test-local follow-on; no production integration is authorized.",
        "evidence": [
          "https://github.com/developing-today/code/issues/8528",
          "https://github.com/developing-today/code/pull/8519",
          "Committed follow-ons/F04.md specifies scope, independent oracle, negative controls and future test command."
        ],
        "acceptance": [
          "Verify #8519 merged before marking implementation ready.",
          "Freshly dedupe, preserve fixture-only scope and route bounded implementation with PBT/MBT and decidable oracle."
        ],
        "tests": [
          "Record triage verdict on issue; proposed test command is future, not already run."
        ],
        "scope": {
          "include": [
            "Triage #8528; isolated synthetic fixtures/reference models only"
          ],
          "exclude": [
            "Production API/schema, deployed authorization certification, live corpus, provider charges, automated movement/deletion"
          ]
        },
        "risk": {
          "level": "low",
          "flags": []
        },
        "priority_reason": "Normal Atlas design follow-on; finite offline fixture/model work.",
        "timebox_minutes": 45,
        "max_attempts": 6,
        "context_refs": [
          "https://github.com/developing-today/code/issues/8528",
          "https://github.com/developing-today/code/issues/6020",
          "https://github.com/developing-today/code/pull/8519"
        ],
        "dedupe": {
          "checked_at": "2026-11-11T04:21:01.537192+00:00",
          "basis": "248-issue Atlas survey, seven targeted issue searches and five all-state title PR searches; no duplicate fixture-only owner found. Search-bounded; recheck at triage."
        }
      }
    }
  3. added
    epic/atlas-programReprioritization program epic (2026-11-12)
    and removed
    status/blockedQueue or user escalation state
    on Nov 11, 2026
  4. added this to the Atlas program milestone on Nov 12, 2026
  5. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · triaged

    Triage (inline, this pass):

    • Work kind: small-fix (task/small-fix) — a pure offline, fixture-only reference simulator; the packet instructs the worker to land the core comparison engine first and split scenario families if the surface is larger than one PR.
    • Priority: priority/normal (already on the issue).
    • Effort: effort/m — one self-contained offline tool plus fixture tests; no operational data or live systems.
    • Kind: kind/enhancement and epic/atlas-program already present.

    Evidence (fresh, 2026-11-16):

    Issue #8528 stays open for task 20168.

  6. 6 remaining items

  7. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    on Nov 17, 2026
  8. added a commit that references this issue on Nov 17, 2026
  9. added and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 17, 2026
  10. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    kind: done
    actor: repo-worker-code (openchamber scheduled lane any-o)
    queue: repo-health-code-pilot task 20168
    pr: #11274 (merged 4a21c41)

    Landed the F04 fixture-only reference simulator as pkgs/atlas-search/crates/atlas-core/tests/placement_model.rs, the seam named in follow-ons/F04.md. Oracles: the hand-calculated unit ledger (two equal-quality choices to 125,350,000 micros, faster choice inside the envelope, forbidden placement infeasible at zero cost, missing price Unknown, insufficient temporary headroom, unmeasured quality), property invariants (determinism, unit-preserving sums, monotonic cost, hard-policy dominance, input validation), and an intentionally naive cheapest-first selector proven wrong on policy and envelope.

    Verification: cargo test --manifest-path pkgs/atlas-search/Cargo.toml -p atlas-core --test placement_model, 13 passed, no warnings. No live pricing, provider bindings or runtime services.

  11. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    Closure watchdog (code#10105): reopening a wrongful auto-close.

  12. removed their assignment
    on Nov 20, 2026
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

    area/infraInfrastructure, deployment, and operationseffort/mMedium: expected under 1 day of workepic/atlas-programReprioritization program epic (2026-11-12)kind/enhancementpriority/normalOrdinary priority (the default)status:to-dotask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions