Skip to content

Add private fed.internal gateway helpers - #12

Open
konard wants to merge 3 commits into
releasefrom
issue-11-59c349bcbfa7
Open

Add private fed.internal gateway helpers#12
konard wants to merge 3 commits into
releasefrom
issue-11-59c349bcbfa7

Conversation

@konard

@konard konard commented May 31, 2026

Copy link
Copy Markdown
Collaborator

Fixes #11

Summary

  • Adds Aptok::PrivateGateway helpers for fed.internal gateway deployments: ACL checks, local-name URL rewriting, KV-backed document caching, actor caching, signed-fetch authorization, and private signature key resolution.
  • Adds RSA actor publicKey resolution through the private actor cache, while preserving the existing proof-key path for Data Integrity keys.
  • Adds a runnable standard-library HTTP gateway example in examples/fed_internal_gateway.cr.
  • Documents the gateway architecture, Crystal module wiring, and dnsmasq/CoreDNS/systemd-resolved snippets in docs/PRIVATE_FED_INTERNAL_GATEWAY.md.

Reproduction and Tests

  • Added spec/private_gateway_spec.cr covering ACL policy, fed.internal local-name rewrites, actor caching, RSA key resolution through the actor cache, and the ACL-gated cached document loader.
  • Verified before implementation that the new focused spec failed on missing Aptok::PrivateGateway.

Verification

  • crystal spec spec/private_gateway_spec.cr
  • crystal spec
  • crystal build examples/fed_internal_gateway.cr --no-codegen

Adding .gitkeep for PR creation (default mode).
This file will be removed when the task is complete.

Issue: #11
@konard konard self-assigned this May 31, 2026
@konard konard changed the title [WIP] Make a dns for local name resolution gateways Add private fed.internal gateway helpers May 31, 2026
@konard
konard marked this pull request as ready for review May 31, 2026 20:18
@konard

konard commented May 31, 2026

Copy link
Copy Markdown
Collaborator Author

Working session summary

Implemented and pushed the solution to PR 12:

#12

What changed:

  • Added Aptok::PrivateGateway helpers for fed.internal gateways: ACLs, local-name URL rewriting, document caching, actor caching, signed-fetch authorization, and private signature key resolution.
  • Added RSA actor publicKey resolution through the actor cache.
  • Added docs with architecture and DNS configs: docs/PRIVATE_FED_INTERNAL_GATEWAY.md.
  • Added runnable example: examples/fed_internal_gateway.cr.
  • Added regression coverage in spec/private_gateway_spec.cr.
  • Removed the generated .gitkeep PR placeholder.

Verification:

  • crystal spec spec/private_gateway_spec.cr
  • crystal spec
  • crystal build examples/fed_internal_gateway.cr --no-codegen
  • GitHub checks on latest commit are passing: check, sqlite, postgres.

PR 12 is marked ready for review and the local working tree is clean.


This summary was automatically extracted from the AI working session output.

@konard

konard commented May 31, 2026

Copy link
Copy Markdown
Collaborator Author

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Model: GPT-5.5
  • Provider: OpenAI
  • Public pricing estimate: $14.993385

📊 Context and tokens usage:

  • 198.0K / 1.1M (19%) input tokens, 34.6K / 128K (27%) output tokens

Total: (198.0K + 11.5M cached) input tokens, 34.6K output tokens, $14.993385 cost

🤖 Models used:

  • Tool: OpenAI Codex
  • Requested: gpt-5.5
  • Model: GPT-5.5 (gpt-5.5)

📎 Log file uploaded as Repository (40154KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard

konard commented May 31, 2026

Copy link
Copy Markdown
Collaborator Author

✅ Ready to merge

This pull request is now ready to be merged:

  • All CI checks have passed
  • No merge conflicts
  • No pending changes

Monitored by hive-mind with --auto-restart-until-mergeable flag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make a dns for local name resolution gateways

1 participant