LearnNewsExamplesServices
Frontmatter
id15014
titleServing-cost meter: deterministic endpoint-owner sampling and provenance report
stateClosed
labels
enhancementaiarchitecture
assigneesneo-opus-grace
createdAt2:12 AM
updatedAt3:00 AM
githubUrlhttps://github.com/neomjs/neo/issues/15014
authorneo-gpt
commentsCount0
parentIssue14687
subIssues
15020 Serving-cost meter: preserve requested-window semantics on early stop
subIssuesCompleted1
subIssuesTotal1
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAt3:00 AM

Serving-cost meter: deterministic endpoint-owner sampling and provenance report

Closed Backlog/active-chunk-5 enhancementaiarchitecture
neo-gpt
neo-gpt commented on 2:12 AM

Context

#14687 is the full serving-cost measurement program: one institution-day, the same workload on at least two available hardware options, and an actual hosting-bill read. The current implementation PR delivers the instrument needed to run that program, but it cannot honestly close the broader evidence program before those measurements exist.

The Problem

The instrument needs its own delivered-scope contract. Its process attribution must also be measurement-safe: a configured endpoint port can have both the listening server and connected client processes, while a remote endpoint has no local owner to sample. Counting every process returned by a port-wide lsof query contaminates the server measurement with client load.

The Architectural Reality

The benchmark CLI is the sanctioned AiConfig-reading entrypoint; aggregation and METRIC-bag shaping remain pure transforms. Endpoint ownership is a local operating-system fact: only the local listening owner is attributable to the configured service. Remote hosts must be reported as unmeasurable by this local-process instrument, never reinterpreted as a local port.

The Fix

Land the steady-state serving-cost instrument as one coherent leaf: local-listener discovery, periodic RSS/CPU sampling, gap-aware deterministic aggregation, provenance-complete METRIC bags, and the zero-number results-document skeleton.

Acceptance Criteria

  • The CLI resolves configured endpoint leaves without re-deriving configuration.
  • Only local listening owner PIDs are sampled; connected clients are excluded.
  • Remote/non-loopback endpoints are explicitly skipped or rejected as not locally measurable.
  • Sampling interval and active threshold are validated as positive finite values before the sampling loop starts.
  • The aggregation core excludes and reports coverage gaps and remains deterministic for identical inputs.
  • Every emitted METRIC bag passes the business-schema gate and carries its falsifying query plus heuristic/coverage disclaimer.
  • The report records named hardware, host facts, interval, threshold, role aggregates, and metric bags; the instrument does not write the graph directly.
  • The public results document contains method and provenance structure but no invented measurement figures.
  • Focused unit coverage and one live local smoke prove the listener-only attribution path.
  • Cross-family review.

Out of Scope

The 24-hour institution run, second-hardware run, live hosting-bill read, and graph ingestion of real results remain open under #14687.

Related

Parent measurement program: #14687. Implementation PR: #15013. Duplicate sweep: live title/body search found only #14687; this ticket is its instrument leaf, not a competing measurement program.

Origin Session ID: 019f484c-662f-7f31-969a-cbde373efd4a Retrieval Hint: "serving cost meter listener owner client process contamination"

tobiu closed this issue on 3:00 AM