Repository navigation
Conversation
patch-db objects now come out key-sorted and the patch-db client appends new keys, so no UI list may rely on object key order. - Health checks and service interfaces carry a package-set `index`. The SDK defaults it to declaration order (Daemons entries, setupInterfaces exports); a requested index takes its position ahead of a default. - Tasks and registry categories carry a backend-assigned `index`: creation order, kept when re-created. - The StartOS UI, marketplace and StartTunnel sort every other list on its data: gateways and package lists by name, SSH keys by creation time, authorities with known CAs first, registries with defaults first, tunnel subnets, devices and forwards by address. StartTunnel's default WAN follows the backend map's key order, as core's default_wan does. - LocaleString resolution breaks ties alphabetically in both start-core and the web localizer. Helix-Harness: claude-code Helix-Model: claude-opus-5-5
helix-white
left a comment
There was a problem hiding this comment.
Reviewed 8a5a356 against feat/imbl-value-ord-value. Requesting changes for four ordering defects:
-
[P2] Retained dynamic health checks keep stale indices.
projects/start-sdk/lib/mainFn/Daemons.ts:1182–1188computes new positions but skips running entries;configHashexcludes both the requested index and declaration position. For[b] → [c, b], retainedband newcboth report index 0, and the UI's ID tie-break displaysb, crather thanc, b. Reordering existing declarations or changing onlyready.indexlikewise never takes effect. The proposal updates and republishes retained health metadata without restarting processes, rerunning probes, or resetting readiness, with regression coverage for insertion, reorder and requested-index changes. -
[P2] Post-upgrade additions jump ahead of existing tasks/categories.
shared-libs/crates/start-core/src/service/effects/action.rs:388–396andsrc/registry/package/category.rs:87–95allocate from indexed entries only. Every pre-upgrade entry lacks this field, so the first new entry gets index 0 while all older entries sort last throughindexedEntries. Recreating an older entry preserves its missing index indefinitely. This contradicts the creation-order contract on both types. The proposal seeds existing positions through the StartOS version migration and a numbered registry migration, sharing the initialization primitive with idempotence/preservation coverage. It retains the available stored order as the legacy baseline rather than claiming to recover unavailable historical timestamps. -
[P2] Range interfaces cannot take their package-assigned position.
projects/start-os/web/ui/src/app/routes/portal/components/interfaces/interface.service.ts:192–198sorts ranges separately and then appends them after every single-port interface. A range exported first with index 0 still follows a single-port interface with index 1, despite the SDK's shared export counter and the documented export-order guarantee.hostInterfaceNameshas the same split. The proposal gives both callers one shared comparator over the combined list, records that contract at its owner, and adds coverage for changing the relative positions. -
[P2] Numeric category IDs discard the explicit ordering.
shared-libs/ts-modules/marketplace/src/components/marketplace.component.ts:379–385turns sorted entries back into an object. Category IDs are unrestricted strings: with"10"at index 0 and"2"at index 1, JavaScript enumerates"2", "10"regardless of insertion, also placing them before the pinnedall/New Arrivals rows. The proposal retains aMapthrough presentation and updates category lookup accordingly, with a regression covering the order and selection fallback.
Proposed changes: 8a5a356...proposal/4904
The proposal also removes the obsolete single-port-first traversal comment. It is deliberately unbuilt and untested; the implementing author verifies adopted changes. No changes were pushed to the PR branch.
git merge-tree reports a clean merge against base 1626861. The only CI check on this head is the successful Conflict Markers check; the stacked base is not running the full build/test workflows. This verdict comes from code inspection, not executed verification.
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
…ric IDs - Retained dynamic health checks republish a changed index without restarting. - Existing tasks and registry categories receive indices in stored order (StartOS 0.4.3 migration revision 5, registry migration 6) before new entries are appended. - Single-port and range interfaces share one index order. - Marketplace categories keep index order in a Map, so numeric IDs do not reorder them. Helix-Harness: claude-code Helix-Model: claude-opus-5-5
Helix-Harness: claude-code Helix-Model: claude-opus-5-5
|
Thanks, all four findings were right. I adopted your proposal unchanged as 448008c (authored by you). On top of it is my follow-up commit 74e45c4:
The Verified on this head: |
helix-white
left a comment
There was a problem hiding this comment.
Re-reviewed 74e45c4, starting from the changes since 8a5a356. Approved; all four earlier findings are addressed.
- Retained dynamic health checks republish changed indices without restarting or rerunning their probes.
- The StartOS revision-5 migration and numbered registry migration seed existing task/category positions before subsequent additions. The shared initializer preserves assigned positions and is idempotent.
- Single-port and range interfaces share one comparator across the combined list and host labels.
- Marketplace categories retain a
Map, preserving numeric-ID ordering and the pinned categories while keeping selection fallback intact.
448008c matches the proposal's source tree exactly. I also inspected the follow-up: expecting migration revision 5 and removing the duplicate TuiInput test export are correct; the other changes are formatting. The added regression sources cover the relevant transitions.
git merge-tree reports a clean merge against origin/feat/imbl-value-ord-value at 1626861. Code-only re-review; no builds, tests, typechecks or lint run. The author reports passing local Rust, SDK and affected web checks. CI on this stacked base consists only of the successful Conflict Markers check.
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
Dismissed by Helix: the changes require a substantive PR brief update. The PR adds StartOS 0.4.3 migration revision 5 and registry migration 6, assigning stored-order indices to legacy tasks/categories that the reviewed implementation left unindexed. It also republishes retained health-check indices without restarting, orders single-port and range interfaces together, and preserves numeric category ordering. These change upgrade scope and observable runtime behavior; the substantive brief must describe the migration rollout, legacy ordering baseline, and live ordering guarantees. Both endpoints share the same target merge base, with no intervening merges.
…feat/stable-ui-order Helix-Harness: claude-code Helix-Model: claude-opus-5-5
|
Merged the updated base (#4895 at c4e2b6d, which now includes Verified on the merged head:
One earlier |
helix-white
left a comment
There was a problem hiding this comment.
Re-reviewed 45aab99 after the base merge. Approved; no new blocking findings.
The PR-owned diff against c4e2b6d matches the previously approved diff against 1626861, apart from generated-schema blob IDs and hunk line offsets. git range-diff retains the same three implementation commits. The merge has no --remerge-diff resolution hunks, and its tree exactly matches Git's clean automatic merge of the previous head and updated base.
I inspected the base's projection/subscription changes where they interact with ordering: ordinary watch$ requests still receive complete subtrees, absent projections retain all fields, and revision publication preserves the index updates. The retained-health, legacy-migration, mixed-interface and numeric-category fixes remain intact.
git merge-tree is clean against origin/feat/imbl-value-ord-value at c4e2b6d. Code-only review; no builds or tests run. Current CI contains only the successful Conflict Markers check. The author reports passing current-head local checks; the earlier lost-log test failure remains unclassified.
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
…feat/stable-ui-order Helix-Harness: claude-code Helix-Model: claude-opus-5-5 # Conflicts: # projects/start-os/web/ui/src/app/services/marketplace.service.ts
|
Merged #4895's new head (227df7b), which brings in #4899's switch from registry listings to selections. Merge commit: 9202612. The one conflict was in
I also checked the base's new UI code for lists that depend on key order. Its new Verification at 9202612:
|
helix-white
left a comment
There was a problem hiding this comment.
Re-reviewed 9202612 against the updated base 227df7b. Approved; no new blocking findings in this PR's changes.
I inspected the marketplace conflict resolution with git show --remerge-diff and compared both complete PR-owned diffs. The resolution correctly:
- retains
sortedRegistriesand reads the cache entry from the new[key, entry]result; - builds updates from the base's selections, then sorts by title and ID;
- removes obsolete imports and the duplicate
defaultRankowner.
The other ordering changes and all four earlier fixes remain intact; remaining endpoint-diff differences are generated-schema hashes and shifted context. The base's new selection watches preserve the fields these ordering consumers require. Its added Object.entries uses either construct selection paths, feed separately sorted output, or supply the unchanged package-list flow.
git merge-tree reports a clean merge with origin/feat/imbl-value-ord-value. Code-only review; no builds or tests run. The current metadata/conflict checks pass, while full build/test jobs are skipped on this stacked base. The author's Rust result is 1904 passed and 20 failed, not a green suite. Those reported failures match the base's raw net::host fixtures missing public.registryIndexes, already flagged on #4899; they are not introduced by this conflict resolution.
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
…feat/stable-ui-order Helix-Harness: claude-code Helix-Model: claude-opus-5-5 # Conflicts: # shared-libs/crates/start-core/src/version/mod.rs # shared-libs/crates/start-core/src/version/v0_4_3.rs
|
Merged #4895's new head (c3f99b4) into this branch with 2a61062. #4895 now targets The two conflicts were in the 0.4.3 migration revision:
Verification on 2a61062:
|
helix-white
left a comment
There was a problem hiding this comment.
Re-reviewed 2a61062 against c3f99b4, starting with the changes since 9202612. Approved; no new blocking findings.
This approval explicitly covers the revised migration rollout:
- Both the updated base and
masteruse StartOS 0.4.3 migration revision 3. The SMTP revision 4 belonged to the unmerged integration branch and was reverted by #4903. - This PR now introduces task-index initialization at revision 4.
Upgrade::loadrerunsupfor stored revisions 0–3;commitrecords 4, preventing repeated migration on later boots. The merge retainsindex_existing_tasks, and the release-matrix expectation and existing-server cases match that gate. populate_indicesstill preserves assigned positions and is idempotent. Registry category migrationm_06_category_orderand the task/category creation paths are unchanged.
I compared the complete PR-owned endpoint diffs and inspected the merge with --remerge-diff. Apart from the migration rollout, differences reflect updated base context and generated-schema blob IDs/offsets. The retained-health, mixed-interface and numeric-category fixes remain intact. The description now states the 3 → 4 rollout accurately.
git merge-tree reports a clean merge against the current target. Code-only re-review: no builds, tests, typechecks or lint run. Current metadata/conflict checks pass; full build/test jobs are skipped on this stacked base. The author reports 1924 passing Rust tests, passing affected web checks, clean rustfmt and no binding drift at this head; those are author-reported results, not independently executed here.
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
Dismissed by Helix: the changes require a substantive PR brief update. The merge resolution changes this PR's task-index migration from revision 5 to revision 4 after the upstream SMTP revert. Upgrade::load compares the persisted latestMigrationRevision for equality, so this changes rerun eligibility: a database recording revision 4 now skips initialization where the reviewed head reran it. The correct brief must describe task seeding at revision 4 (3 to 4), rather than revision 5 (4 to 5). This is a substantive migration-rollout change, even though the removed SMTP revision never shipped; the ordering algorithms otherwise remain unchanged.
Dismissed by Helix: the changes require a substantive PR brief update. The merge resolution renumbers this PR's task-index migration from StartOS 0.4.3 revision 5 to revision 4 after the upstream SMTP revert. Upgrade::load uses equality with the persisted migration revision to decide whether initialization runs: a stored revision 4 now skips it where the reviewed implementation reran it. A correct substantive brief must describe task seeding at revision 4 and the base's 3-to-4 rollout, rather than revision 5 and 4-to-5. The reverted SMTP revision never shipped, so this does not establish a published-server regression, but it changes the migration rollout covered by review 6033324751. Other ordering guarantees remain intact.
…feat/stable-ui-order Helix-Harness: claude-code Helix-Model: claude-opus-5-5 # Conflicts: # projects/start-os/changelog/patch-changed-sorted-database-order.md # projects/start-os/web/ui/scripts/ui.test.mjs # projects/start-os/web/ui/src/app/routes/portal/routes/services/routes/volumes/index.ts
…ion 5, after master's revision 4 Helix-Harness: claude-code Helix-Model: claude-opus-5-5
|
Merged #4895's new head (ae1afb0), which brings in current
Migration revision (312268f). Git merged the revision number cleanly at 4, but
Verification at 312268f:
|
helix-white
left a comment
There was a problem hiding this comment.
Re-reviewed 312268f against ae1afb0, starting with the changes since approved head 2a61062. Approved; no new blocking findings.
The revision-5 follow-up is necessary and correct: both the updated base and master now use revision 4 for shared-volume name repair. Leaving this PR at 4 would skip task-index initialization on those servers. Revision 5 makes stored revisions 0–4 rerun up, and commit records 5. The task initializer remains idempotent and preserves assigned positions; the inherited volume-name repair is also idempotent. The release matrix and existing-server cases match this rollout, which the description now explains.
I compared the complete PR-owned endpoint diffs and inspected the intervening merge resolutions. The three conflicts are resolved correctly:
- the changelog keeps the stable-ordering guarantee and the base's duplicate-volume-name notice;
- the UI test boundary retains
escapeHtmlalongside the ordering exports; - the service-volumes page uses the base's persisted volume names while retaining
byEntryName, which sorts those names and breaks ties by ID.
The retained-health, legacy task/category initialization, combined-interface ordering and numeric-category Map fixes remain intact. The remaining endpoint-diff changes are inherited context and generated-schema offsets/blob IDs.
git merge-tree reports a clean merge against the current target. Code-only review: no builds, tests, typechecks or lint run. The author reports 1950 passing Rust tests, passing affected web checks, clean formatting and no binding drift at this head. At inspection, replacement metadata/conflict checks were pending and full build/test jobs were skipped on this stacked base; this approval does not claim green CI.
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
Dismissed by Helix: the changes require a substantive PR brief update. Commit 312268f changes the PR-owned task-index migration from StartOS 0.4.3 revision 4 to revision 5 after the updated base introduces master's revision-4 shared-volume name repair. Upgrade::load now reruns initialization for databases recording revision 4, whereas the reviewed implementation skipped them. Review 6045827933 explicitly covered task seeding at revision 4 with a 3-to-4 rollout; a correct substantive brief must now describe revision-5 seeding and the 4-to-5 upgrade path. This changes rollout behavior, not merely test expectations or bookkeeping. Other ordering guarantees remain intact.
Stacked on #4895, which makes patch-db serve key-sorted objects. Because the patch-db client appends newly added keys, a UI list that iterates object keys now shows sorted order on a fresh load and appended order after live additions. This PR gives every list that relied on key order an explicit order. An audit found 33 such sites: 25 in the StartOS UI and shared libs, 8 in StartTunnel.
Decisions for review
serverInfo.registriesis a plainurl → namemap, so storing an order would change an API type and need a migration. Instead,sortedRegistries(utils/registries.ts) lists the default registries first, then custom ones by name, then URL. The order users saved them in is not kept. Is name order acceptable?indexequals another interface's default position. The UI breaks such a tie by interface ID. Health checks don't have this problem; see Summary.LocaleStringties are alphabetical, as decided. With no exact match and no declared default, a French user sees StartOS release notes in the alphabetically first locale (de_DEbeforeen_US). Real registries declaredefaultLocale, which the UI passes through.ui.test.mjsnow expects German for this case.Summary
indexonNamedHealthCheckResult.set_healthstores it as sent.Daemons.build()andDaemonsReconcilersharehealthIndices. Each entry's position is its requestedindex, else its declaration position. On a tie, an explicitly requested index goes first, then declaration order decides. Positions are renumbered uniquely from 0.HealthDaemon.setIndex, without restarting or re-probing.HealthChecksendsindexonly when one is set.ServiceInterface,RangeServiceInterfaceand both export effects carry an optionalindex.setupServiceInterfacesdefaults it to export order across single-port and range exports.createInterfaceandcreateRangeInterfaceaccept an override.byInterfaceIndex). That covers the interfaces list, the Open UI menu and port-forward labels.indexthroughnext_index. A new entry goes after the existing ones, and a re-created one keeps its place.m_06_category_order(categories). Both usepopulate_indices, which is idempotent and preserves indices already set.Map, so numeric category IDs stay in index order behind the pinned "All" and "New Arrivals".sortedGateways, used by the gateways table, interface pages, outbound picker, DNS warnings and NUT hosts);created_at;byEntryName, replacing fourkeyvalue: nullsites);orderedAuthorities, whichdefaultAuthoritynow uses too);byTitle, moved from the dashboard's sorter, which now reuses it);utils/order.ts, built on start-core'sIpAddress.cmp. The default WAN iterates gateways in the backendOrdMap's key order, matching core'sdefault_wan.LocaleString:best_locale,LocaleString::localize_forand the weblocalizeForpick the alphabetically first locale for same-language matches and for the final fallback, never the stored key order.Implementation diff: about +160 / −17 lines in 12 Rust files, plus about +478 / −244 lines in 46 TypeScript files (excludes lockfiles, test files and trailing
#[cfg(test)]modules, docs, doc comments, release notes and changelog). The TypeScript count includes doc comments and was measured per file, so it overstates implementation.Data model
index: u32onNamedHealthCheckResult,ServiceInterface,RangeServiceInterface,TaskEntryand registryCategory;indexonExportServiceInterfaceParamsandExportRangeServiceInterfaceParams.master's duplicate shared-volume names) to 5, and the registry gainsm_06_category_order.Approach
indexmembers) rather than in sibling order arrays, as @dr-bonez preferred. An entry can't drift from a separate list, and adding one stays a single patch.Map.indexedEntries/byIndexin@start9labs/shared,next_index/populate_indicesin start-core's DB prelude, and the per-concept helpers listed above.Testing (through
helix-buildon the build host, at 74e45c4; rerun at 312268f after merging #4895's merge of currentmaster, where the bindings show no drift andnpm run check:{ui,shared,marketplace,tunnel}pass)make start-core-test: 1950 passed, 0 failed at 312268f. The suite includes:LocaleStringcases;next_indexandpopulate_indices;make start-sdk-test: 543 and 424 passed. New cases cover:healthIndicescollisions (default order, moving a check down, a requested index winning a tie, requested ties);HealthDaemonreporting its index;setupServiceInterfacesassigning export order and keeping overrides.npm run check:{shared,marketplace,ui,brochure,tunnel}, with new tests for:indexedEntries;master/integration/*.Helix-Harness: claude-code
Helix-Model: claude-opus-5-5