Fix native media registration for managed IndeeHub stacks

This commit is contained in:
archipelago
2026-10-09 10:45:38 -04:00
parent 5ba52f1d21
commit 424070d215
4 changed files with 65 additions and 2 deletions
@@ -201,12 +201,12 @@ impl RpcHandler {
anyhow::ensure!(
state
.package_data
.get("indeedhub-api")
.get("indeedhub")
.is_some_and(|entry| matches!(
entry.state,
crate::data_model::PackageState::Running
)),
"The installed IndeeHub API must be running to register its media"
"The installed IndeeHub app must be running to register its media"
);
let identity =
crate::identity::NodeIdentity::load_existing(&self.config.data_dir.join("identity"))
@@ -48,6 +48,12 @@ pub(crate) fn installed_context(
state: &crate::data_model::DataModel,
) -> Result<InstalledAppContext> {
for id in ["indeedhub", "indeedhub-api"] {
// Stack components are not separate package records on managed installs.
// Keep validating legacy standalone API records when they exist; the
// installed parent and its existing API identity pin are mandatory.
if id == "indeedhub-api" && !state.package_data.contains_key(id) {
continue;
}
let entry = state
.package_data
.get(id)
@@ -613,6 +619,12 @@ mod tests {
assert!(installed_context(root.path(), &identity, &state).is_err());
let pin = ensure_for_installation(root.path(), "indeedhub-api", &identity).unwrap();
let first = installed_context(root.path(), &identity, &state).unwrap();
let api_entry = state.package_data.remove("indeedhub-api").unwrap();
assert_eq!(
installed_context(root.path(), &identity, &state).unwrap(),
first
);
state.package_data.insert("indeedhub-api".into(), api_entry);
assert_eq!(first.app_audience, pin.app_audience);
assert_eq!(first.app_origins, vec!["https://localhost:7778"]);
state.package_data.get_mut("indeedhub-api").unwrap().state =
+13
View File
@@ -42,6 +42,19 @@ acceptance; this is a new paid-file incident.
## Current tasks
- [ ] **2026-10-09 IndeeHub UAT remains failed:** operator still reports wrong
Nostr identity, upload failure and confusing always-visible publishing UI.
Preserve native identities; remove only app-local generated/imported accounts.
Require explicit Archipelago selection and matching API profile. On Yaya,
`media.registration.context` logs `IndeeHub is not installed` while all seven
containers run. Authenticated state includes only the parent `indeedhub`
package; the registration code incorrectly requires a separate
`indeedhub-api` package record. Candidate correction retains parent running/
installed checks and the existing API installation pin; it checks a legacy
API package when present. Source tests/build and live registration acceptance
must complete before closing. Move publishing to its own editor tab, preserve
computer-upload state and existing pending registration requests.
- [x] Yaya App Store component/alias regression (reported 2026-10-02): one
Cuprate entry (hide Cuprate UI companion), one BTCPay Server in Commerce
with its icon (merge legacy btcpay pins), one NetBird entry (hide server
+38
View File
@@ -92,8 +92,46 @@ hardening rather than claiming every cache key was erased. The IndeeHub frontend
commits `0d6434e` and `71cf546a` remain local because that repository has no ngit
coordinate; do not publish them Gitea-only under the mirror policy.
### IndeeHub selected-identity regression — UAT reopened 9 October 2026
Operator UAT disproved the earlier sign-out acceptance: choosing the homeserver
identity could continue with a previously active saved account and display a
different npub. `loginWithExtension` caught selection/provider failures without
rethrowing, after which the modal read `accountManager.active`; that pointer could
still name the old account. IndeeHub commits `a4d3946` and `86256ee` now clear the
active pointer before an explicit native switch, propagate failure, bind the
authentication call to the exact returned signer account, and retain the
Archipelago provider hook in the source index. A regression starts with a stale
saved account and proves a failed selection cannot fall back to it while the
saved key itself remains preserved.
All 155 frontend tests, type checking and the production build pass. A live Yaya
frontend-only correction is installed with rollback under the operator's private
artifact directory. The served index references the provider, provider SHA256 is
still `ad4c93b3b25545dca1b391c5add75e5bc618c865290805f7ac5d1ad0fd18b469`,
the service worker was regenerated to invalidate the brief provider-less cache,
and `/health` passes. Automated Chromium confirms the provider loads and no stale
active account is restored. Real homeserver selection and displayed-npub matching
remain pending operator UAT; the current live filesystem correction is not yet a
new signed catalog/image activation and must not be described as durable managed
deployment acceptance.
## Combined Yaya UAT candidate — 9 October 2026
Follow-up operator request: retain all node-native identities; remove IndeeHub's
Create Account/private-key import and reset only its old browser accounts.
IndeeHub commit `7fbdc74` removes generation/import handlers and screens, performs
a one-time removal of `indeedhub-accounts`, `indeedhub-active-account` and app
session credentials, and corrects the default API base from browser localhost
to `/api`. The previous live hotfix was built without explicit API settings,
explaining its network error; its earlier success claims were premature.
Twenty-one focused authentication/reset tests pass and the production build
passes with `/api`, `/storage`, `/relay`, mock off and publication enabled.
This updated static bundle is deployed to Yaya's existing frontend container;
its index SHA256 is `a14834acab5fc9b42f55a92c540b9b765334ac7d2d2628ddc82bc1c5725d53ad`.
Node identity storage was not modified. Signed-image recreation and real native
identity sign-in acceptance remain outstanding.
The combined source is published on ngit and mirrored byte-for-byte to Gitea at
main `bb933d409187a8181e284a5a91a81b4e036b3036`, based on accepted main
`aff408cc`. Its integration commits retain each proposal head as a parent: