Skip to content
TheChatArchiveThe Chat Archive
composer-2.5· unknownHugging Face ibragim-bad/swe_rebench_07_2026_trajectories

Removing a registered or subscribed service leaves stale local metadata After a…

  1. User

    Removing a registered or subscribed service leaves stale local metadata

    After a successful unregister or unsubscribe operation, the corresponding provider or consumer URL must no longer participate in local metadata, service matching, or revision calculation. Removing one URL must preserve unrelated registrations. If the remote operation fails, local metadata must not be removed as though the operation succeeded.

    Interface

    Type: Function Name: RemoveService Path: metadata/metadata.go Input: registryId string, url *common.URL Output: (no return value) Description: Removes a provider service URL from the local metadata for the given registry. Use this during unregister flows to keep the in-memory application-level metadata consistent with the actual exported services.

    Type: Function Name: RemoveSubscribeURL Path: metadata/metadata.go Input: registryId string, url *common.URL Output: (no return value) Description: Removes a subscribed service URL from the local metadata for the given registry. Use this during unsubscribe flows to ensure stale subscribed URLs are cleaned from the application-level metadata.

  2. Assistant

    Inspecting metadata handling and unregister/unsubscribe flows in the repository.

  3. Assistant

    Implementing metadata removal functions and wiring them into unregister/unsubscribe flows.

  4. Assistant

    Summary

    Stale in-memory metadata after unregister/unsubscribe is fixed by mirroring the existing AddService / AddSubscribeURL APIs and calling them only after remote operations succeed.

    metadata/metadata.go

    • RemoveService(registryId, url) — delegates to MetadataInfo.RemoveService when that registry’s metadata exists (drops the provider URL from services and exported URLs).
    • RemoveSubscribeURL(registryId, url) — same pattern for subscribed consumer URLs.

    registry/servicediscovery/service_discovery_registry.go

    • UnRegisterService — after each successful serviceDiscovery.Unregister, removes the matching exported URL from local metadata (matched by instance ID / URL address). Failed unregisters leave metadata unchanged.
    • UnRegister — on full success of UnRegisterService, also calls metadata.RemoveService for the URL being unregistered.
    • UnSubscribe — after successful serviceNameMapping.Remove, calls metadata.RemoveSubscribeURL.

    Behavior matches the requirements: metadata is updated only on success, one URL is removed without touching others, and failed remote calls do not clear local state.

    Checks: go test ./metadata/... ./registry/servicediscovery/... passed; git diff --check clean; production diff is 2 files, +35 lines.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.