Skip to content

Accept DocuMentor's development Postgres without TLS where switched on - #8

Merged
TheFabFab merged 1 commit into
documentor-pgfrom
documentor-dev-plaintext-host
Oct 18, 2026
Merged

TheFabFab merged 1 commit into
documentor-pgfrom
documentor-dev-plaintext-host

Conversation

@TheFabFab

Copy link
Copy Markdown
Owner

OPENCODE_DATABASE_URL must name a loopback host or carry sslmode=verify-full. DocuMentor's development Postgres (documentor-dev-agentstate on a dev host's Docker network) is plaintext by design and holds development data only; DocuMentor's own agent-state config accepts exactly that host when DOCUMENTOR_AGENTSTATE_PLAINTEXT_HOST switches the exception on. This fork had no matching exception, so every opencode process a dev server spawned exited while initialising:

OPENCODE_DATABASE_URL names the remote host documentor-dev-agentstate without sslmode=verify-full

This adds the same rule: OPENCODE_DATABASE_PLAINTEXT_HOST=documentor-dev-agentstate lets that one host connect when the URL itself says sslmode=disable. The host is fixed in code, so the setting cannot name another host, and it never relaxes a URL that asks for any other mode.

  • packages/core/src/database/target.ts: the exception.
  • packages/core/test/pg/target.test.ts: refused without the switch; with it, refused for any other host, a missing sslmode or sslmode=require.
  • documentor/FORK.md: the setting.

DocuMentor passes the setting to opencode only where its own exception already applies (follow-up in TheFabFab/KPG, the example-project branch).

🤖 Generated with Claude Code

OPENCODE_DATABASE_PLAINTEXT_HOST=documentor-dev-agentstate lets that one
host connect with sslmode=disable, as DocuMentor's own agent-state config
does. The host is fixed in code; the setting only switches the exception
on, so no value downgrades another host or relaxes a URL's own mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 72 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions

Copy link
Copy Markdown

Hey! Your PR title Accept DocuMentor's development Postgres without TLS where switched on doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@TheFabFab
TheFabFab merged commit f1a33e2 into documentor-pg Oct 18, 2026
6 of 11 checks passed
@TheFabFab
TheFabFab deleted the documentor-dev-plaintext-host branch October 18, 2026 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant