Skip to content

Commit 6db9843

Browse files
committed
fix(deploy): renumber migration 0077 -> 0078 (finding 1)
Six sibling open PRs in this batch (#560, #561, #563-#566) all added a migration numbered 0077. Land-queue assignment gives #560 0077 and this PR 0078, per the batch owner's collision resolution. Renumbers the migration file and every code/doc reference to it (coordinator, PG row mapping, fleet.proto + regenerated TS, ADR 0046 addendum, the live-PG round-trip test's comment). Review: #561 (comment)
1 parent 73c8a3c commit 6db9843

10 files changed

Lines changed: 10 additions & 10 deletions

File tree

‎crates/engram-coordinator/src/api/hosts.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ pub struct HostView {
8080
pub util_cpu_pct: f32,
8181
/// Issue #540 (host RAM ledger attribution): measured base-shm tmpfs
8282
/// residency, and the running/parked split of guest PSS. `0` until
83-
/// the host's first post-0077 heartbeat. `base_shm_pending_mib` is
83+
/// the host's first post-0078 heartbeat. `base_shm_pending_mib` is
8484
/// deliberately absent here — it's transient host-local state
8585
/// already folded into `allocatable_mib`, not durable PG state.
8686
pub util_base_shm_mib: u64,

‎crates/engram-coordinator/tests/placement_reservation_live_pg.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ async fn fleet_free_mib_sql_runs_against_real_pg() {
185185
#[tokio::test]
186186
#[ignore = "requires live Postgres at ENGRAM_TEST_DATABASE_URL"]
187187
async fn ram_ledger_util_columns_round_trip_through_real_pg() {
188-
// Issue #540 / migration 0077: `touch_host_heartbeat` writes the RAM
188+
// Issue #540 / migration 0078: `touch_host_heartbeat` writes the RAM
189189
// ledger's attribution columns (util_base_shm_mib, util_parked_pss_mib,
190190
// util_running_pss_mib), and `list_active_hosts` (row_from_row) reads
191191
// them back into the SAME `HostRecord.utilization` `reserve_placement`

‎crates/engram-postgres/src/row.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ pub(crate) fn host_from_row(row: &PgRow) -> Result<HostRecord, MetaError> {
103103
let util_mem_used_mib: i64 = row.try_get("util_mem_used_mib").map_err(col_err)?;
104104
let util_cpu_pct: f32 = row.try_get("util_cpu_pct").map_err(col_err)?;
105105
let util_allocatable_mib: i64 = row.try_get("allocatable_mib").map_err(col_err)?;
106-
// Issue #540 (host RAM ledger attribution, migration 0077).
106+
// Issue #540 (host RAM ledger attribution, migration 0078).
107107
// `base_shm_pending_mib` has no PG column (transient host-local
108108
// state, already folded into `util_allocatable_mib` above) — it
109109
// stays 0 across a DB round-trip; the host's own `/metrics` is the

‎crates/engram-protocol/proto/engram/app/v1/fleet.proto‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ message HostView {
106106
uint64 free_vcpus = 23;
107107
// Issue #540 (host RAM ledger attribution): measured base-shm tmpfs
108108
// residency, and the running/parked split of guest PSS. `0` until the
109-
// host's first post-0077 heartbeat. `base_shm_pending_mib` is
109+
// host's first post-0078 heartbeat. `base_shm_pending_mib` is
110110
// deliberately absent — it's transient host-local state already
111111
// folded into `allocatable_mib`, not durable PG state this view reads.
112112
uint64 util_base_shm_mib = 24;

deploy/migrations/0077_host_ram_ledger.sql renamed to deploy/migrations/0078_host_ram_ledger.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
-- `/metrics` (`engram_host_ram_ledger_mib{category="base_shm_pending"}`) —
1414
-- not durable multi-replica-consistent state PG needs to hold.
1515
--
16-
-- Additive + serde-defaulted: pre-0077 hosts (and non-Linux dev backends)
16+
-- Additive + serde-defaulted: pre-0078 hosts (and non-Linux dev backends)
1717
-- report 0 for all three, same posture as every other util_* column.
1818

1919
ALTER TABLE hosts ADD COLUMN IF NOT EXISTS util_base_shm_mib BIGINT NOT NULL DEFAULT 0;

‎docs/adr/0046-placement-memory-reservation.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ and the pressure gate's `free_pct` can never diverge.
254254

255255
See `crates/engram-host-agent/src/ram_ledger.rs` for the implementation; the
256256
per-category attribution rides the wire as `HostUtilization.{base_shm_mib,
257-
parked_pss_mib, running_pss_mib}` (migration 0077) and the
257+
parked_pss_mib, running_pss_mib}` (migration 0078) and the
258258
`engram_host_ram_ledger_mib{category=...}` gauge family.
259259

260260
[#147]: https://github.com/cortexapps/engrams/issues/147

‎orchestrator/src/gen/engram/app/v1/fleet_pb.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ export type HostView = Message<"engram.app.v1.HostView"> & {
197197
/**
198198
* Issue #540 (host RAM ledger attribution): measured base-shm tmpfs
199199
* residency, and the running/parked split of guest PSS. `0` until the
200-
* host's first post-0077 heartbeat. `base_shm_pending_mib` is
200+
* host's first post-0078 heartbeat. `base_shm_pending_mib` is
201201
* deliberately absent — it's transient host-local state already
202202
* folded into `allocatable_mib`, not durable PG state this view reads.
203203
*

‎web/src/gen/engram/app/v1/fleet_pb.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ export type HostView = Message<"engram.app.v1.HostView"> & {
197197
/**
198198
* Issue #540 (host RAM ledger attribution): measured base-shm tmpfs
199199
* residency, and the running/parked split of guest PSS. `0` until the
200-
* host's first post-0077 heartbeat. `base_shm_pending_mib` is
200+
* host's first post-0078 heartbeat. `base_shm_pending_mib` is
201201
* deliberately absent — it's transient host-local state already
202202
* folded into `allocatable_mib`, not durable PG state this view reads.
203203
*

‎web/src/lib/types.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ export interface HostView {
163163
util_cpu_pct: number;
164164
/** Issue #540 (host RAM ledger attribution): measured base-shm tmpfs
165165
* residency, and the running/parked split of guest PSS. 0 until the
166-
* host's first post-0077 heartbeat. */
166+
* host's first post-0078 heartbeat. */
167167
util_base_shm_mib: number;
168168
util_parked_pss_mib: number;
169169
util_running_pss_mib: number;

‎web/src/pages/Fleet.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ function HostCard({
198198
</div>
199199
{/* Issue #540: the RAM ledger's attribution — where the host's
200200
RAM actually went, broken out of the single mem bar above.
201-
Hidden until the host's first post-0077 heartbeat. */}
201+
Hidden until the host's first post-0078 heartbeat. */}
202202
{(host.util_base_shm_mib > 0 ||
203203
host.util_running_pss_mib > 0 ||
204204
host.util_parked_pss_mib > 0) && (

0 commit comments

Comments
 (0)