ARTEX/db
Grady May a383e5bcb2 feat(db): store proxy pool entries behind a masked API
Part 1 of 4 of the proxy pool design in #545: storage and a CRUD API.
Nothing activates an entry yet, so the global proxy is unchanged.

- Migration 0028 adds proxy_pool: a unique keyed address hash, at most
  one active entry (partial unique index), a CHECK that the active entry
  is enabled, and nullable egress_ip, last_check_at and last_check_ok for
  the health check.
- Addresses are normalized, sealed at rest (AAD proxy_pool.address) and
  covered by the startup key check and key rotation. Uniqueness uses an
  HMAC under a sub-key kept on secretBox; RotateSecretKey locks the table
  and rehashes in its transaction, and pool writes seal under that lock.
- GET/POST /api/proxy-pool and PATCH/DELETE /api/proxy-pool/{id} never
  return an address; a masked address on update keeps the stored one.
2026-12-02 22:05:05 -05:00
..
migrations feat(db): store proxy pool entries behind a masked API 2026-12-02 22:05:05 -05:00
activity_outbox.go chore: migrate log.Printf to log/slog in llmpool, llmrec, intercept and db 2026-11-23 18:31:30 -08:00
activity_outbox_test.go test: clean remaining residual rows across db, agent, and server test suites 2026-11-20 22:54:57 +01:00
activity_page_test.go fix(report): paginate all findings instead of capping at 1000 2026-12-01 06:32:21 +03:00
asset_dsl.go fix(db): honour != on company_id and task_id in the asset DSL 2026-11-26 17:13:12 +05:30
asset_dsl_limit_test.go fix(db): bound asset DSL length and parenthesis depth 2026-11-19 14:25:04 +01:00
asset_dsl_not_null_test.go fix(db): honour != on company_id and task_id in the asset DSL 2026-11-26 17:13:12 +05:30
asset_dsl_or_scope_test.go fix(db): ignore agent-written task_scope rows on read paths 2026-11-30 23:24:50 +01:00
asset_intercept.go feat(db): add a domain_suffix asset interception rule kind 2026-12-01 21:10:12 +01:00
asset_intercept_canonical_test.go fix: reject malformed intercept domains and align the IDN profile 2026-12-02 12:28:31 +01:00
asset_intercept_domain_suffix_test.go feat(db): add a domain_suffix asset interception rule kind 2026-12-01 21:10:12 +01:00
asset_intercept_domain_valid_test.go fix: close fuzzy fullwidth dot bypass and reject URL chars in intercept domains 2026-12-02 14:27:13 +01:00
asset_intercept_match.go fix: close fuzzy fullwidth dot bypass and reject URL chars in intercept domains 2026-12-02 14:27:13 +01:00
asset_intercept_match_test.go feat(db): add a domain_suffix asset interception rule kind 2026-12-01 21:10:12 +01:00
assets.go refactor(db): use modern Go idioms 2026-12-03 00:44:15 +05:30
assets_test.go refactor(db): use modern Go idioms 2026-12-03 00:44:15 +05:30
bedrock_gateway_test.go fix: bind Bedrock headers to gateway and redact errors 2026-11-22 22:31:06 +08:00
browser_mcp.go refactor(db): use modern Go idioms 2026-12-03 00:44:15 +05:30
browser_mcp_test.go Refactor PostgreSQL test skipping logic 2026-11-19 14:23:29 -03:00
chat_bridge_approvals.go fix(chatbridge): recheck bridge access before spending an approval button 2026-11-30 19:13:50 +01:00
chat_bridge_approvals_test.go fix(chatbridge): recheck bridge access before spending an approval button 2026-11-30 19:13:50 +01:00
chat_bridge_chat_type_backfill_test.go security: bind stored LLM keys to their route, bearer-only sessions, SSRF and log hardening 2026-11-29 22:35:38 +01:00
chat_bridges.go feat(chatbridge): remote approvals with one-time buttons (#642 2/3) 2026-11-28 23:07:52 +01:00
chat_bridges_test.go feat(chatbridge): remote approvals with one-time buttons (#642 2/3) 2026-11-28 23:07:52 +01:00
chat_mentions.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
cleanup_helpers_test.go test(db): close the pool after the row cleanups, report cleanup errors 2026-11-14 00:38:00 +01:00
commands.go db: versioned migrations runner with schema_migrations 2026-11-14 12:52:34 +01:00
companies.go security: promote company scope egress only when approved by the operator 2026-12-01 20:44:37 +01:00
companies_test.go security: promote company scope egress only when approved by the operator 2026-12-01 20:44:37 +01:00
company_lock_test.go feat(assets): add editable company and task scopes 2026-08-24 19:29:14 +08:00
company_scope.go feat(scope): accept *.example.com in asset scope 2026-11-24 03:28:46 +05:30
company_scope_approval_test.go security: flow spawn company inheritance only through the caller's approved set 2026-12-02 17:55:36 +01:00
company_scope_consistency_test.go security: promote company scope egress only when approved by the operator 2026-12-01 20:44:37 +01:00
company_scope_test.go security: promote company scope egress only when approved by the operator 2026-12-01 20:44:37 +01:00
config.go refactor(db): use modern Go idioms 2026-12-03 00:44:15 +05:30
config_max_tokens_test.go Refactor PostgreSQL test skipping logic 2026-11-19 14:23:29 -03:00
config_test.go Refactor PostgreSQL test skipping logic 2026-11-19 14:23:29 -03:00
constants.go feat(skills,agent,server): add API wordlist, 5-part discovery gate, and opt-in target fingerprint 2026-11-28 03:03:19 +01:00
constraints.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
conversation.go feat(intercept): target-gate schema, opt-in flag and approval requests (S3b 1.2-1.4) 2026-11-10 23:05:47 +01:00
conversation_pin_test.go Refactor PostgreSQL test skipping logic 2026-11-19 14:23:29 -03:00
cors_verification.go fix(verify): reject non-canonical IPv4 origins in CORS proofs 2026-11-30 21:48:57 +01:00
cors_verification_test.go fix(verify): reject non-canonical IPv4 origins in CORS proofs 2026-11-30 21:48:57 +01:00
coverage_graph_large_test.go Refactor PostgreSQL test skipping logic 2026-11-19 14:23:29 -03:00
coverage_ledger.go Coverage ledger: review fixes (one-line capped fields, framed gap lines, per-run end_reason) 2026-11-12 20:48:34 +01:00
coverage_ledger_test.go Refactor PostgreSQL test skipping logic 2026-11-19 14:23:29 -03:00
customtool_test.go Refactor PostgreSQL test skipping logic 2026-11-19 14:23:29 -03:00
dashboard_usage_indexes_test.go perf(db): add partial covering indexes for dashboard/usage queries (migration 0010) 2026-11-20 21:48:31 +01:00
db.go fix(db): match rm -r -f / and the other separated flag forms (GHSA-2crf) 2026-11-30 23:26:11 +01:00
db_test.go Refactor PostgreSQL test skipping logic 2026-11-19 14:23:29 -03:00
digest.go refactor(db): use modern Go idioms 2026-12-03 00:44:15 +05:30
evidence_rewrite_flag_test.go feat(llmrec): opt-in LLM context size telemetry and aggregation (P3.5 phase A) 2026-11-20 18:15:23 +01:00
evidence_secrets_test.go Refactor PostgreSQL test skipping logic 2026-11-19 14:23:29 -03:00
exploration.go fix(report): paginate all findings instead of capping at 1000 2026-12-01 06:32:21 +03:00
exploration_sources.go refactor(db): use modern Go idioms 2026-12-03 00:44:15 +05:30
exploration_sources_test.go fix(db): return approved_by_operator and expanded in the task scope list 2026-12-01 22:01:09 +02:00
exploration_test.go Refactor PostgreSQL test skipping logic 2026-11-19 14:23:29 -03:00
exploration_tokens_test.go refactor(db): use modern Go idioms 2026-12-03 00:44:15 +05:30
export_test.go fix(intercept): judge decisions were stored as unknown (prefix case mismatch) 2026-11-09 12:22:46 +01:00
fact_capture_migration_test.go fix(agent,db): isolate fact capture provenance and tighten prove_goal (#602) 2026-11-28 10:00:55 +01:00
fact_only_intents_test.go fix(agent,db): finish the fact-only counter 2026-11-23 23:12:41 +01:00
finding_assets.go refactor(db): use modern Go idioms 2026-12-03 00:44:15 +05:30
finding_assets_test.go fix(company-switcher): address review on #425 2026-11-22 09:44:37 +00:00
finding_dedup_pool.go feat(agent): add deterministic finding fingerprint deduplication complementing LLM triage (#473) 2026-11-27 01:08:46 +01:00
finding_quality_test.go test: clean up residual findings, retest conversations, parent assets, and test rows 2026-11-20 22:18:53 +01:00
finding_reasoning_test.go test: clean up residual findings, retest conversations, parent assets, and test rows 2026-11-20 22:18:53 +01:00
finding_retests.go fix(db): run lesson extraction inside the status and retest transaction (#269) 2026-11-21 16:22:27 +01:00
finding_retests_test.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
finding_retests_verification_test.go feat: a completed retest updates the verification state 2026-11-09 21:47:40 +01:00
finding_severity_case_test.go fix(db): store a finding's severity in canonical lowercase 2026-11-28 19:53:30 +05:30
finding_traffic.go refactor(db): use modern Go idioms 2026-12-03 00:44:15 +05:30
finding_traffic_archive.go secrets: encrypt the evidence snapshot heads at rest 2026-11-13 22:56:52 +01:00
finding_traffic_archive_test.go test: clean up residual findings, retest conversations, parent assets, and test rows 2026-11-20 22:18:53 +01:00
finding_verification.go feat: verified findings backend (S1) 2026-11-09 20:21:27 +01:00
findings.go fix(company-switcher): address review on #425 2026-11-22 09:44:37 +00:00
findings_test.go refactor(db): use modern Go idioms 2026-12-03 00:44:15 +05:30
goal_reopen_test.go fix(db): mirror SetNodeState (blocked_reason, content_version) when reopening goals (#269) 2026-11-21 17:54:21 +01:00
intent_admission.go feat(tasks): add runtime controls and inherited context 2026-08-24 19:29:00 +08:00
intent_claim_test.go refactor(db): use modern Go idioms 2026-12-03 00:44:15 +05:30
intent_context.go fix: recover empty planning rounds in large graphs (#676) 2026-11-30 03:16:35 +01:00
intent_control_test.go refactor(db): use modern Go idioms 2026-12-03 00:44:15 +05:30
intent_delete_test.go Refactor PostgreSQL test skipping logic 2026-11-19 14:23:29 -03:00
intent_schedule.go fix: recover empty planning rounds in large graphs (#676) 2026-11-30 03:16:35 +01:00
intent_schedule_test.go fix: recover empty planning rounds in large graphs (#676) 2026-11-30 03:16:35 +01:00
intercept.go feat: show and filter the decided_by actor in the approval records 2026-11-09 22:35:09 +01:00
intercept_argv_test.go Intercept: argv prefix rules (match_type=argv) 2026-11-13 10:14:39 +01:00
intercept_decided_by_test.go feat: show and filter the decided_by actor in the approval records 2026-11-09 22:35:09 +01:00
intercept_detail.go Intercept judge: closed-question mode, fail-closed to ask 2026-11-12 22:35:11 +01:00
intercept_detail_test.go feat: record which actor decided an intercept approval 2026-11-09 22:17:56 +01:00
intercept_execution.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
intercept_execution_test.go 精简动作审查输入并支持审批来源定位 (#125) 2026-09-15 23:51:37 +08:00
intercept_filter_test.go fix(intercept): judge decisions were stored as unknown (prefix case mismatch) 2026-11-09 12:22:46 +01:00
intercept_pending_summary.go fix: poll compact task approval summaries instead of full history 2026-12-02 07:22:15 +00:00
intercept_pending_summary_test.go fix: poll compact task approval summaries instead of full history 2026-12-02 07:22:15 +00:00
intercept_persistence_seed.go security(agent): confine the file tools and close the executor review 2026-11-20 05:35:54 +01:00
intercept_persistence_seed_test.go security(agent): confine the file tools and close the executor review 2026-11-20 05:35:54 +01:00
intercept_seed_test.go fix(db): match rm -r -f / and the other separated flag forms (GHSA-2crf) 2026-11-30 23:26:11 +01:00
intercept_source_test.go fix(intercept): judge decisions were stored as unknown (prefix case mismatch) 2026-11-09 12:22:46 +01:00
jsonb_clean_test.go fix(db): side_question checkpoint 入库前剥除 jsonb 不支持的 NUL 转义 2026-09-12 03:00:28 -04:00
lessons.go fix(db): ignore agent-written task_scope rows on read paths 2026-11-30 23:24:50 +01:00
lessons_test.go refactor(db): use modern Go idioms 2026-12-03 00:44:15 +05:30
llm_context.go fix(agent,db): finish the fact-only counter 2026-11-23 23:12:41 +01:00
llm_context_test.go feat(llmrec): opt-in LLM context size telemetry and aggregation (P3.5 phase A) 2026-11-20 18:15:23 +01:00
llm_records_migrate_test.go Refactor PostgreSQL test skipping logic 2026-11-19 14:23:29 -03:00
llm_usage.go refactor(db): use modern Go idioms 2026-12-03 00:44:15 +05:30
llm_usage_cost_test.go test: clean up residual findings, retest conversations, parent assets, and test rows 2026-11-20 22:18:53 +01:00
llm_usage_ts_index_test.go Refactor PostgreSQL test skipping logic 2026-11-19 14:23:29 -03:00
llmhealth.go feat(llm): add profile failover and pool health 2026-08-24 19:28:18 +08:00
llmretry.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
llmretry_test.go Refactor PostgreSQL test skipping logic 2026-11-19 14:23:29 -03:00
logs.go fix(db): check rows.Err after iterating query results (#539) 2026-11-27 00:15:26 +01:00
migrate.go db: refuse a pending migration older than the newest applied one 2026-11-14 13:10:57 +01:00
migrate_test.go refactor(db): use modern Go idioms 2026-12-03 00:44:15 +05:30
nkey.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
notification.go refactor(db): use modern Go idioms 2026-12-03 00:44:15 +05:30
notification_delivery.go Encrypt stored secrets at rest in PostgreSQL 2026-11-13 14:42:56 +01:00
notification_test.go refactor(db): use modern Go idioms 2026-12-03 00:44:15 +05:30
planner_focus.go fix: recover empty planning rounds in large graphs (#676) 2026-11-30 03:16:35 +01:00
planner_progress.go fix(planner): keep needs_attention across automatic resumes 2026-11-30 03:16:35 +01:00
planner_progress_bounds_test.go fix(planner): keep needs_attention across automatic resumes 2026-11-30 03:16:35 +01:00
planner_progress_test.go fix: recover empty planning rounds in large graphs (#676) 2026-11-30 03:16:35 +01:00
proxy_pool.go feat(db): store proxy pool entries behind a masked API 2026-12-02 22:05:05 -05:00
proxy_pool_test.go feat(db): store proxy pool entries behind a masked API 2026-12-02 22:05:05 -05:00
retarget.go security: isolate task execution in per-task sandbox worker and egress proxy 2026-11-30 19:09:32 +01:00
rows_err_test.go fix(db): check rows.Err after iterating query results (#539) 2026-11-27 00:15:26 +01:00
schema.sql feat(db): add a domain_suffix asset interception rule kind 2026-12-01 21:10:12 +01:00
secrets.go feat(db): store proxy pool entries behind a masked API 2026-12-02 22:05:05 -05:00
secrets_rotate_test.go feat(db): store proxy pool entries behind a masked API 2026-12-02 22:05:05 -05:00
secrets_test.go test(db): stop TestSecretBoxCrypto from failing on a random ciphertext 2026-12-01 02:23:00 +01:00
settings.go Bind sessions to a password version so revocation cannot tie inside one second. 2026-11-17 22:54:16 +01:00
settings_insert_test.go Refactor PostgreSQL test skipping logic 2026-11-19 14:23:29 -03:00
side_questions.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
side_questions_test.go refactor(db): use modern Go idioms 2026-12-03 00:44:15 +05:30
skill_gaps.go feat(server): capability-gap report from skill misses 2026-10-19 00:33:08 +02:00
skill_usage.go 归档 2026-08-28 12:56:29 +08:00
skill_usage_test.go Refactor PostgreSQL test skipping logic 2026-11-19 14:23:29 -03:00
skill_visibility_test.go fix(agent): keep Auto and MainAgent on orchestration tools, not Bash/WebFetch 2026-11-26 21:35:20 +01:00
target_gate_backfill_test.go security: promote company scope egress only when approved by the operator 2026-12-01 20:44:37 +01:00
target_pins.go fix(intercept): refuse late target approvals under the task row lock 2026-12-02 17:43:50 +01:00
target_pins_test.go Merge pull request #865 from sisantaChhatoi/refactor/go-modernize-db 2026-12-02 21:32:50 +01:00
task_archive_aggregate_stats.go 归档 2026-08-28 12:56:29 +08:00
task_archives.go refactor(db): use modern Go idioms 2026-12-03 00:44:15 +05:30
task_archives_restore.go refactor(db): use modern Go idioms 2026-12-03 00:44:15 +05:30
task_archives_restore_url_test.go db: normalise archived asset URLs on restore 2026-11-14 12:17:33 +01:00
task_archives_test.go fix(agent,db): isolate fact capture provenance and tighten prove_goal (#602) 2026-11-28 10:00:55 +01:00
task_assets.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
task_assets_context.go fix(db): return approved_by_operator and expanded in the task scope list 2026-12-01 22:01:09 +02:00
task_assets_test.go test: clean up residual findings, retest conversations, parent assets, and test rows 2026-11-20 22:18:53 +01:00
task_categories.go feat(tasks): 任务列表支持批量修改分类 2026-08-24 09:16:44 -04:00
task_categories_test.go Refactor PostgreSQL test skipping logic 2026-11-19 14:23:29 -03:00
task_context.go fix(db): ignore agent-written task_scope rows on read paths 2026-11-30 23:24:50 +01:00
task_context_lock_test.go Refactor PostgreSQL test skipping logic 2026-11-19 14:23:29 -03:00
task_context_unit_test.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
task_credentials.go Encrypt stored secrets at rest in PostgreSQL 2026-11-13 14:42:56 +01:00
task_delete_concurrency_test.go refactor(db): use modern Go idioms 2026-12-03 00:44:15 +05:30
task_intercept.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
task_list_performance_test.go Refactor PostgreSQL test skipping logic 2026-11-19 14:23:29 -03:00
task_llm_spend_test.go test: clean remaining residual rows across db, agent, and server test suites 2026-11-20 22:54:57 +01:00
task_metadata_test.go Record task target gate changes in activity history 2026-12-02 11:36:18 +05:30
task_outcome.go feat(server): per-task outcome card for RSI baselines 2026-10-19 00:28:27 +02:00
task_queue_test.go Refactor PostgreSQL test skipping logic 2026-11-19 14:23:29 -03:00
task_rotation_test.go refactor(db): use modern Go idioms 2026-12-03 00:44:15 +05:30
task_scope.go security: promote company scope egress only when approved by the operator 2026-12-01 20:44:37 +01:00
task_scope_approval_test.go security: promote company scope egress only when approved by the operator 2026-12-01 20:44:37 +01:00
task_scope_company_expansion_test.go security: promote company scope egress only when approved by the operator 2026-12-01 20:44:37 +01:00
task_scope_egress.go fix: review minors: propagate company egress reads, stale comment, changelog 2026-12-02 17:19:17 +01:00
task_scope_egress_test.go fix: review minors: propagate company egress reads, stale comment, changelog 2026-12-02 17:19:17 +01:00
task_scope_read_approval_test.go fix(db): ignore agent-written task_scope rows on read paths 2026-11-30 23:24:50 +01:00
task_scope_test.go Refactor PostgreSQL test skipping logic 2026-11-19 14:23:29 -03:00
task_source_limit_test.go feat(tasks): add runtime controls and inherited context 2026-08-24 19:29:00 +08:00
task_templates.go feat: 任务模板支持预设分类与任务级拦截/允许规则 2026-09-19 09:27:03 -04:00
task_templates_test.go refactor(db): use modern Go idioms 2026-12-03 00:44:15 +05:30
tasks.go merge: origin/main 048e8a8 (keep both Unreleased security entries; review 6154399166 entanglement per AGENTS.md 5) 2026-12-02 18:00:41 +01:00
tasks_test.go refactor(db): use modern Go idioms 2026-12-03 00:44:15 +05:30
testmain_test.go Encrypt stored secrets at rest in PostgreSQL 2026-11-13 14:42:56 +01:00
testpg.go fix(db): declare Skip on the test skipper interface 2026-11-19 14:38:23 -03:00
tool_usage.go 归档 2026-08-28 12:56:29 +08:00
tool_usage_test.go Refactor PostgreSQL test skipping logic 2026-11-19 14:23:29 -03:00
tools.go secrets: encrypt the exec spec of custom tools at rest 2026-11-13 21:52:27 +01:00
tools_secrets_test.go Refactor PostgreSQL test skipping logic 2026-11-19 14:23:29 -03:00
traffic_rewrite.go feat(db): store capture-proxy rewrite rules, sealed at rest 2026-11-17 00:12:09 +01:00
traffic_rewrite_test.go refactor(db): use modern Go idioms 2026-12-03 00:44:15 +05:30
traffic_tamper_hooks.go feat(db): add traffic_tamper_hooks migration 0011, sealed CRUD, versions, and rollback 2026-11-21 00:48:27 +01:00
traffic_tamper_hooks_test.go test: stabilize the UDP control-close test and the sealed hook test 2026-11-21 01:00:52 +01:00
triggers.go fix(scheduler): fire on_task_timeout for tasks that time out out of id order 2026-11-23 01:33:19 -08:00