ARTEX/db
BaaRai 2613c50363 feat(db): store capture-proxy rewrite rules, sealed at rest
Migration 0005 creates traffic_rewrite_rules. The matchers and actions
columns are two JSON secret columns of db/secrets.go: InitSecrets, which runs
after the migrations, checks the key against them and encrypts any plaintext
row, as it does for the existing columns.

The CRUD lists rules in execution order and enforces 100 rules, 50 of them
enabled, under a table lock so concurrent writers cannot pass a limit.
UpdateTrafficRewriteRule hands the stored rule to an edit callback inside the
transaction, which is where a caller keeps a value it was not sent.

InitSecrets also derives the sub-key that fingerprints sensitive values in
the rewrite trace (HMAC-SHA256 of "artex-traffic-trace" under the secret key).
2026-11-17 00:12:09 +01:00
..
migrations feat(db): store capture-proxy rewrite rules, sealed at rest 2026-11-17 00:12:09 +01:00
activity_page_test.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
asset_dsl.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
asset_intercept.go ci: run gofmt in the go job, and format the 11 files it flags 2026-11-15 13:38:35 +01:00
asset_intercept_match.go fix(intercept): match block rules on the declared targets before any lookup 2026-11-11 15:47:58 +01:00
asset_intercept_match_test.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
assets.go db: drop URL userinfo in normalizeURL before storing assets.url 2026-11-14 11:56:43 +01:00
assets_test.go ci: run gofmt in the go job, and format the 11 files it flags 2026-11-15 13:38:35 +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 db: report hidden asset count in malformed-ip warning suffix 2026-11-10 15:49:41 +01:00
companies_test.go db: report hidden asset count in malformed-ip warning suffix 2026-11-10 15:49:41 +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 Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
company_scope_consistency_test.go test(db): close the pool after the row cleanups, report cleanup errors 2026-11-14 00:38:00 +01:00
company_scope_test.go test(db): make profile and company-scope tests repeatable on one database 2026-11-13 23:46:42 +01:00
config.go fix(db): record an explicit skill-visibility off instead of deleting the row 2026-11-16 23:48:40 +08:00
config_max_tokens_test.go feat(llm): 模型配置新增输出上限,支持 max_completion_tokens 字段名 2026-08-31 12:20:31 -04:00
config_test.go test(db): make profile and company-scope tests repeatable on one database 2026-11-13 23:46:42 +01:00
constants.go Translate all Chinese text to English 2026-10-08 23:14:34 +02: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 test(db): close the pool after the row cleanups, report cleanup errors 2026-11-14 00:38:00 +01:00
coverage_graph_large_test.go perf(db): batch coverage-graph lookups and index icp scope probes 2026-11-14 21:16:49 +01: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 test(db): close the pool after the row cleanups, report cleanup errors 2026-11-14 00:38:00 +01:00
customtool_test.go test(db): close the pool after the row cleanups, report cleanup errors 2026-11-14 00:38:00 +01:00
db.go fix(db): record an explicit skill-visibility off instead of deleting the row 2026-11-16 23:48:40 +08:00
db_test.go fix: prevent OOM when archiving large tasks 2026-08-28 15:25:20 +08:00
digest.go feat(digest): 探索图冷节点压缩(cold-digest) 2026-09-09 11:52:15 -04:00
evidence_secrets_test.go secrets: encrypt the evidence snapshot heads at rest 2026-11-13 22:56:52 +01:00
exploration.go perf(db): per-task metrics for the task detail and an index-served latest activity 2026-11-15 08:20:08 +01:00
exploration_sources.go chore: sync upstream v0.3.6 changes 2026-08-28 14:03:07 +08:00
exploration_sources_test.go test(db): close the pool after the row cleanups, report cleanup errors 2026-11-14 00:38:00 +01:00
exploration_test.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
exploration_tokens_test.go Merge upstream/main into codex/btw-side-question 2026-09-11 08:47:57 +08:00
export_test.go fix(intercept): judge decisions were stored as unknown (prefix case mismatch) 2026-11-09 12:22:46 +01:00
finding_assets.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
finding_assets_test.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
finding_reasoning_test.go feat(findings): optional counterevidence and confidence_rationale 2026-11-11 23:43:12 +01:00
finding_retests.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
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_traffic.go secrets: encrypt the evidence snapshot heads at rest 2026-11-13 22:56:52 +01:00
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 feat: 支持漏洞关联多条流量证据 2026-09-10 13:03:20 +08:00
finding_verification.go feat: verified findings backend (S1) 2026-11-09 20:21:27 +01:00
findings.go feat(findings): optional counterevidence and confidence_rationale 2026-11-11 23:43:12 +01:00
findings_test.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
intent_admission.go feat(tasks): add runtime controls and inherited context 2026-08-24 19:29:00 +08:00
intent_claim_test.go feat(engine): intent claim heartbeat, TTL and fencing token (S3c) 2026-11-10 17:45:11 +01:00
intent_control_test.go feat(tasks): add runtime controls and inherited context 2026-08-24 19:29:00 +08:00
intent_delete_test.go Translate all Chinese text to English 2026-10-08 23:14:34 +02: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_seed_test.go Translate all Chinese text to English 2026-10-08 23:14:34 +02: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 feat(rsi): evidence-gated lesson library in shadow mode 2026-10-21 14:25:35 +02:00
lessons_test.go feat(rsi): evidence-gated lesson library in shadow mode 2026-10-21 14:25:35 +02:00
llm_records_migrate_test.go db: versioned migrations runner with schema_migrations 2026-11-14 12:52:34 +01:00
llm_usage.go fix(db): stop billing cache writes twice in profile cost 2026-11-15 18:17:33 +01:00
llm_usage_cost_test.go fix(db): stop billing cache writes twice in profile cost 2026-11-15 18:17:33 +01:00
llm_usage_ts_index_test.go fix(db): index llm_usage.ts for the usage time-window queries 2026-11-16 00:00:56 +01: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 test(db): make profile and company-scope tests repeatable on one database 2026-11-13 23:46:42 +01:00
logs.go chore: ARTEX 初始化 2026-07-26 04:27:45 -04: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 feat(db): store capture-proxy rewrite rules, sealed at rest 2026-11-17 00:12:09 +01:00
nkey.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
notification.go Encrypt stored secrets at rest in PostgreSQL 2026-11-13 14:42:56 +01:00
notification_delivery.go Encrypt stored secrets at rest in PostgreSQL 2026-11-13 14:42:56 +01:00
notification_test.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
schema.sql Encrypt stored secrets at rest in PostgreSQL 2026-11-13 14:42:56 +01:00
secrets.go feat(db): store capture-proxy rewrite rules, sealed at rest 2026-11-17 00:12:09 +01:00
secrets_test.go secrets: encrypt search keys, proxies and the LLM profile proxy at rest 2026-11-13 21:33:27 +01:00
settings.go secrets: encrypt search keys, proxies and the LLM profile proxy at rest 2026-11-13 21:33:27 +01:00
settings_insert_test.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
side_questions.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
side_questions_test.go fix(btw): 修复长对话上下文预算与旁路输入布局 2026-09-11 00:41:01 +08:00
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 feat(skills): track usage and missing dependencies 2026-08-24 19:30:14 +08:00
skill_visibility_test.go fix(db): record an explicit skill-visibility off instead of deleting the row 2026-11-16 23:48:40 +08:00
target_pins.go feat(intercept): target extraction, resolver, exemptions and the gate in the hook (S3b 1.5-1.7) 2026-11-11 00:34:55 +01:00
target_pins_test.go feat(intercept): target extraction, resolver, exemptions and the gate in the hook (S3b 1.5-1.7) 2026-11-11 00:34:55 +01:00
task_archive_aggregate_stats.go 归档 2026-08-28 12:56:29 +08:00
task_archives.go perf(server): look up only the requested task archive blocker in getTask 2026-11-16 06:46:52 +01:00
task_archives_restore.go db: normalise archived asset URLs on restore 2026-11-14 12:17:33 +01:00
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 perf(server): look up only the requested task archive blocker in getTask 2026-11-16 06:46:52 +01:00
task_assets.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
task_assets_context.go docs(coverage): say "declared domain or IP root" for auto-scope roots (F8) 2026-11-12 09:38:52 +01:00
task_assets_test.go test(db): close the pool after the row cleanups, report cleanup errors 2026-11-14 00:38:00 +01:00
task_categories.go feat(tasks): 任务列表支持批量修改分类 2026-08-24 09:16:44 -04:00
task_categories_test.go test(db): close the pool after the row cleanups, report cleanup errors 2026-11-14 00:38:00 +01:00
task_context.go feat: expose concurrent multi-LLM worker rotation 2026-11-16 15:31:47 -06:00
task_context_lock_test.go test(db): close the pool after the row cleanups, report cleanup errors 2026-11-14 00:38:00 +01: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 feat(tasks): add runtime controls and inherited context 2026-08-24 19:29:00 +08:00
task_intercept.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
task_list_performance_test.go perf(db): per-task metrics for the task detail and an index-served latest activity 2026-11-15 08:20:08 +01:00
task_metadata_test.go 1、将排序做到border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted里,无需单独做个button 2、指定重命名使用ICO,无需使用菜单 2026-08-25 14:56:15 +08:00
task_outcome.go feat(server): per-task outcome card for RSI baselines 2026-10-19 00:28:27 +02:00
task_queue_test.go feat(tasks): add runtime controls and inherited context 2026-08-24 19:29:00 +08:00
task_rotation_test.go feat: expose concurrent multi-LLM worker rotation 2026-11-16 15:31:47 -06:00
task_scope.go perf(db): batch coverage-graph lookups and index icp scope probes 2026-11-14 21:16:49 +01:00
task_scope_test.go ci: run gofmt in the go job, and format the 11 files it flags 2026-11-15 13:38:35 +01: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 test(db): close the pool after the row cleanups, report cleanup errors 2026-11-14 00:38:00 +01:00
tasks.go feat: expose concurrent multi-LLM worker rotation 2026-11-16 15:31:47 -06:00
tasks_test.go test(db): close the pool after the row cleanups, report cleanup errors 2026-11-14 00:38:00 +01:00
testmain_test.go Encrypt stored secrets at rest in PostgreSQL 2026-11-13 14:42:56 +01:00
tool_usage.go 归档 2026-08-28 12:56:29 +08:00
tool_usage_test.go 抽屉优化 2026-08-25 12:05:26 +08: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 secrets: encrypt the exec spec of custom tools at rest 2026-11-13 21:52:27 +01: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 feat(db): store capture-proxy rewrite rules, sealed at rest 2026-11-17 00:12:09 +01:00
triggers.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00