Skip to content

feat: publish_service tool for public API deployment#48

Merged
nydamon merged 1 commit intomainfrom
pr/publish-service-tool
Mar 9, 2026
Merged

feat: publish_service tool for public API deployment#48
nydamon merged 1 commit intomainfrom
pr/publish-service-tool

Conversation

@nydamon
Copy link
Owner

@nydamon nydamon commented Mar 9, 2026

Public service publishing for compintel.co subdomains

  • New publish_service tool for publishing local services to public
  • Handles DNS configuration via Cloudflare and Caddy setup
  • Domain whitelist validation, subdomain normalization, health checks
  • Integrated with OPERATIONAL.md governance standards

Status: ✅ Code review PASSED
Blockers: NONE

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7c2dccf1f5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +571 to +575
for (const record of existingRecords.filter((r) => r.host === fqdn)) {
await cf.deleteRecord(zoneId, record.id);
}
const proxied = args.proxied === true;
const record = await cf.addRecord(zoneId, "A", fqdn, originIp, 1, proxied);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Move DNS cutover after successful publish checks

This updates DNS before the Caddy config/reload and healthcheck run, so any failure in ctx.conway.exec(...) leaves the old record deleted and the hostname pointed at an unverified backend. In practice, a bad Caddy reload or a down local service will return an error but still cause immediate downtime for an already-live subdomain because there is no rollback path after the DNS mutation.

Useful? React with 👍 / 👎.

await cf.deleteRecord(zoneId, record.id);
}
const proxied = args.proxied === true;
const record = await cf.addRecord(zoneId, "A", fqdn, originIp, 1, proxied);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Honor proxied flag when creating Cloudflare records

The tool accepts proxied and even reports (proxied) on success, but this call passes the flag to addRecord even though the provider implementation only sends type/name/content/ttl to Cloudflare, so the proxy mode is never actually set. That means operators can believe traffic is behind Cloudflare when the record is still DNS-only.

Useful? React with 👍 / 👎.

Comment on lines +251 to +252
if (/\b(?:localhost|127\.0\.0\.1)\b/i.test(combined)) {
return false;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Allow public evidence even when local checks are reported

This guard rejects completion as soon as localhost or 127.0.0.1 appears anywhere in output/artifacts, even if the same evidence includes a valid public HTTPS route check. That blocks legitimate completion reports that include both local smoke-test output and public verification, which is a common deployment workflow for these tasks.

Useful? React with 👍 / 👎.

- New publish_service tool for publishing local services to compintel.co subdomains
- Handles DNS configuration via Cloudflare and Caddy reverse proxy setup
- Validates domain whitelist, subdomain normalization, health checks
- Integrates with OPERATIONAL.md publication authority standards
- System prompt updates to guide agent on public service publishing

This tool enables production deployment of public APIs without requiring shell
backgrounding or manual infrastructure setup.
@nydamon nydamon force-pushed the pr/publish-service-tool branch from 7c2dccf to 4371124 Compare March 9, 2026 15:52
@nydamon nydamon merged commit 7ccd333 into main Mar 9, 2026
2 of 4 checks passed
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.

1 participant