sqlite-web 0.7.2
gitea.db
issue_content_history
Create
Query
access
access_token
action
action_artifact
action_run
action_run_index
action_run_job
action_runner
action_runner_token
action_schedule
action_schedule_spec
action_task
action_task_output
action_task_step
action_tasks_version
action_variable
app_state
attachment
auth_token
badge
branch
collaboration
comment
commit_status
commit_status_index
commit_status_summary
commit_sync_log
commit_sync_status
dbfs_data
dbfs_meta
deploy_key
email_address
email_hash
external_login_user
follow
gpg_key
gpg_key_import
hook_task
issue
issue_assignees
issue_content_history
issue_dependency
issue_index
issue_label
issue_pin
issue_user
issue_watch
label
language_stat
lfs_lock
lfs_meta_object
login_source
milestone
mirror
notice
notification
oauth2_application
oauth2_authorization_code
oauth2_grant
org_user
package
package_blob
package_blob_upload
package_cleanup_rule
package_file
package_property
package_version
project
project_board
project_issue
protected_branch
protected_tag
public_key
pull_auto_merge
pull_request
push_mirror
reaction
release
renamed_branch
repo_archiver
repo_hidden_file
repo_indexer_status
repo_license
repo_redirect
repo_topic
repo_transfer
repo_unit
repository
review
review_state
secret
session
sqlite_sequence
star
stopwatch
system_setting
task
team
team_invite
team_repo
team_unit
team_user
topic
tracked_time
two_factor
upload
user
user_badge
user_blocking
user_open_id
user_redirect
user_setting
version
watch
webauthn_credential
webhook
Toggle helper tables
Structure
Content
Query
Insert
Drop
Import
Export
Delete row 35 from issue_content_history
id
35
poster_id
5
issue_id
852
comment_id
0
edited_unix
1793111829
content_text
> 状态说明:本 PR 已于 2026-10-27 合入 `main`(合并提交 `7835e
> 状态说明:本 PR 已于 2026-10-27 合入 `main`(合并提交 `7835e3b`),合并时 CI 检查尚未运行;远端 CI 结果以本 PR 的检查为准。 ## 概要 执行蓝图 D-10(关闭 H22):HR API 默认只监听 `127.0.0.1`,需要容器或局域网访问时必须显式设 `HOST`(如 `0.0.0.0`,双栈用 `::`)。改动前后都实测了 04 runtime 容器的可达性。记录见 `docs/domain/enterprise-control-plane-integration-blueprint-2026-10-27.md` §4.7。 ## 改动 - **监听地址单源** `apps/api-nestjs/src/listen-host.ts`:未设或空 `HOST` → `127.0.0.1`,否则用显式值。`main.ts` 只经 `resolveListenHost()` 取值,启动日志写明是否只在回环上监听。 - **Web 默认目标**:`next.config.ts` 代理与 `useRealtime` 的 WS 默认值从 `localhost:3001` 改为 `127.0.0.1:3001`,避免 `localhost` 先解析到 `::1` 时连不上只听 IPv4 回环的 API;`.claude/launch.json` 同步。 - **防回潮**:`check:dual-backend` 新增 `scripts/lib/listen-host-guard.mjs`(默认值必须是回环,`main.ts` 不得绕过解析函数),node 单测 9 个负例;把默认值改回 `0.0.0.0` 的变异探针判红 2 处。行为单测 `apps/api-nestjs/test/listen-host.test.ts` 3 例。 - **文档同步**:CLAUDE.md(常用命令、运行时拓扑、G23 中 H22 移为已关闭)、README、后端规范、Scope 来源接入、蓝图 §4.7 / H22 / D-10、给 04 的答复草稿、框架同步评估 F-7。 ## 实测证据 证据文件:`docs/evidence/d10-listen-host-2026-10-27.json`(本机 Docker Desktop;对 04 容器只做只读 GET,未改 04 的容器或配置)。 **改动前**,用宿主上的最小 HTTP 探针: | 绑定 | 宿主回环 | 本机局域网 IP | 04 容器经 `host.docker.internal` | | --- | --- | --- | --- | | `0.0.0.0` | 可达 | 可达 | 可达 | | `127.0.0.1` | 可达 | 不可达 | 可达(宿主看到来源 `127.0.0.1`) | 结论:改为回环默认后,04 的 Scope 来源探针(`SCOPE_HR_SOURCE_URL` 指向 `host.docker.internal:65281`)仍可达。 **改动后**,用真实构建的 HR API 配本仓一次性 PostgreSQL/Redis(跑完已删除): | `HOST` | lsof | 局域网 `/api/health` | 04 容器 `/api/health` | | --- | --- | --- | --- | | 未设 | `127.0.0.1` | 不可达 | 200,database/redis up | | 空串 | `127.0.0.1` | 不可达 | 200,database/redis up | | `0.0.0.0` | `*` | 200 | 200,database/redis up | 另外,Web 不设 `API_PROXY_TARGET` 时,经 Next 代理访问 `/api/health` 返回 200。 **全量验收**(本地,clean `9c53371`,一次性库,跑完已删,报告无口令命中): - `check:runtime` 455/455:比 452 多出的是新增的 3 例;冻结行为、多实例 Outbox、依赖故障三项均通过。 - `check:ui` 46/46。 - `check:governance` 仅剩已知两项回退:O22(OS main 不含 0.19.6)、`osProductReleaseTargetRemotes` 2→1;来源指纹违规 0。 - 远端 CI 以本 PR 的运行为准。 **未覆盖**: - 未用 Scope 来源真实凭据调用签名查询,只证明网络可达。 - Linux 原生 Docker 经 `host-gateway` 连不到宿主回环,这类部署必须显式设 `HOST`。 - 仓外 65281 实例当前无进程;它的源码 `326ae3e` 不读 `HOST`,恢复前须换到含本改动的提交。 - `apps/web` 的 `next dev` / `next start` 仍按 Next 默认监听全部网卡,不在本 PR 范围。 ## 待裁:00 框架 F-7 00 框架 `apps/api-nestjs/src/main.ts:8` 仍是 `process.env.HOST ?? "0.0.0.0"`;`backend-standard.md:7`、`COMPATIBILITY.md:45`、ADR-0010 与迁移手册都把 `0.0.0.0` 写成默认,理由是容器内可达。HR 因此有意与框架不同。本 PR 未改框架仓,请框架 Owner 二选一: - **(a)** 框架也改为回环默认,容器部署在 Dockerfile / compose 里显式设 `HOST=0.0.0.0`。 - **(b)** 维持 `0.0.0.0`,在 `COMPATIBILITY.md` 登记「消费者可偏离为回环」。 无论选哪个,下一次框架同步或叠加仓 `replace: true`(F-5)都不得把 HR 的回环默认冲回去。详见 `docs/framework-sync-assessment-2026-10-27.md` F-7。 ## 另外发现(不在本 PR 范围) - `apps/api-nestjs/docker-compose.yml` 的开发 PostgreSQL(口令为 `app`)与 Redis 映射到 `0.0.0.0`,属同类暴露。 - `CLAUDE.md` 基线表 runtime 行仍是 10-25 的读数 452:报告指纹包含文档,验收后改文档会使报告失效,留待下次改文档时一并更新。 🤖 Generated with [Claude Code](https://claude.com/claude-code)
...
is_first_created
0
is_deleted
0
Delete
Cancel