Complete WP-0010: HTTP remote federation with cache
Some checks failed
ci / validate-registry (push) Has been cancelled

Extend federation manifest schema for url sources with auth and TTL metadata.
Fetch remote capability indexes over HTTP(S), cache under
registry/federation/cache/, and fall back to stale cache on fetch failure.
Add --refresh flag, seven federation tests, and updated federation docs.
This commit is contained in:
2026-06-15 02:28:44 +02:00
parent c9b957d398
commit e8797b2e91
13 changed files with 487 additions and 45 deletions

View File

@@ -146,7 +146,7 @@ def cmd_overlaps(args: argparse.Namespace) -> int:
def cmd_federation_compose(args: argparse.Namespace) -> int:
try:
target, warnings = write_federated_index()
target, warnings = write_federated_index(refresh=args.refresh)
except (FileNotFoundError, ValueError) as exc:
print(f"error: {exc}", file=sys.stderr)
return 1
@@ -258,6 +258,11 @@ def main(argv: list[str] | None = None) -> int:
)
federation_sub = federation.add_subparsers(dest="federation_command", required=True)
compose = federation_sub.add_parser("compose", help="compose federated index")
compose.add_argument(
"--refresh",
action="store_true",
help="bypass remote index cache and refetch URL sources",
)
compose.set_defaults(func=cmd_federation_compose)
query = subparsers.add_parser("query", help="query capability index")