Skip to content

fix: narrow browser and extension boundaries / 收窄浏览器与扩展边界 - #38

Merged
tiye merged 1 commit into
mainfrom
codex/strict-dependency-chain-20260903
Sep 2, 2026
Merged

fix: narrow browser and extension boundaries / 收窄浏览器与扩展边界#38
tiye merged 1 commit into
mainfrom
codex/strict-dependency-chain-20260903

Conversation

@tiye

@tiye tiye commented Sep 2, 2026

Copy link
Copy Markdown
Member

English

Closes #37.

What changed

  • Upgrade to the fully released strict chain: Calcit/@calcit/procs 0.13.75, alerts 0.10.27, respo-feather 0.4.8, Reel 0.6.11, respo-markdown 0.4.29, respo-ui 0.7.14, and Respo 0.16.89.
  • Add external-object traits for document visibility, extension messages, focus events, target ancestry, and DOM token lists.
  • Narrow nullable host values before comparison or DOM operations; extension action enters application flow as Option<String>.
  • Preserve legacy nullable boolean hydration with explicit boolean cases under Calcit 0.13.75.
  • Align package.json to project version 0.0.4, addressing the unresolved review note from PR chore: upgrade Calcit 0.13.73 and Respo 0.16.88 / 升级依赖链 #35.
  • Replace the compiler-owned JSON quality baseline with generated Cirru EDN, mark it as generated text, and enforce strict Caps resolution in CI.

The seven current-compiler warnings from #37 are eliminated. Unresolved totals move 84 → 83 and schema Dynamic moves 64 → 63; the existing 20 nil sites remain budgeted for staged cleanup.

Validation

  • caps --strict
  • caps verify --toolchain
  • yarn install --immutable
  • calcit edit format with no additional Snapshot diff
  • calcit --check-only with zero preprocessing warnings
  • calcit analyze quality --baseline config/calcit-quality.cirru
  • calcit analyze dynamic-methods --summary-only --format json
  • calcit test: 5 passed
  • calcit js
  • Node 24 Vite production build

中文

关闭 #37

修改

  • 升级到完整已发布严格依赖链:Calcit/@calcit/procs 0.13.75、alerts 0.10.27、respo-feather 0.4.8、Reel 0.6.11、respo-markdown 0.4.29、respo-ui 0.7.14、Respo 0.16.89。
  • 为 document visibility、extension message、focus event、target ancestry 与 DOM token list 增加 external-object traits。
  • 在比较或 DOM 操作前收窄 nullable host value;extension action 以 Option<String> 进入应用控制流。
  • 在 Calcit 0.13.75 下通过显式布尔分支保留旧 nullable boolean hydration 行为。
  • package.json 对齐到项目版本 0.0.4,落实 PR chore: upgrade Calcit 0.13.73 and Respo 0.16.88 / 升级依赖链 #35 尚未处理的 review 意见。
  • 将编译器直接消费的 JSON 质量 baseline 改为生成的 Cirru EDN,标记为 generated text,并在 CI 强制 Caps strict 解析。

#37 的 7 条当前编译器告警已清零。unresolved 总数从 84 降到 83,schema Dynamic 从 64 降到 63;既有 20 个 nil 位置继续按阶段清理。

验证

  • caps --strict
  • caps verify --toolchain
  • yarn install --immutable
  • calcit edit format 无额外 Snapshot diff
  • calcit --check-only 零 preprocessing warning
  • calcit analyze quality --baseline config/calcit-quality.cirru
  • calcit analyze dynamic-methods --summary-only --format json
  • calcit test:5 passed
  • calcit js
  • Node 24 Vite production build

Copilot AI lite review requested due to automatic review settings September 2, 2026 16:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The functional changes align with the stated acceptance criteria and the remaining review notes are minor repository-hygiene improvements.

Pull request overview

This PR upgrades the project’s Calcit/Respo dependency chain and tightens browser/extension host boundaries by introducing typed external-object traits and Option-based narrowing at ingress, while also migrating the Calcit quality baseline from compiler-owned JSON to generated Cirru EDN and enforcing stricter Caps resolution in CI.

Changes:

  • Bump Calcit/@calcit/procs and Respo stack versions; align app versioning to 0.0.4.
  • Introduce typed host-boundary traits and safer narrowing for focus events, document visibility, and extension messages (extension actions flow as Option<String>).
  • Replace config/calcit-quality.json baseline with generated config/calcit-quality.cirru, and update CI to use caps --strict plus the new baseline path.
File summaries
File Description
yarn.lock Updates lockfile to reflect upgraded dependency versions (notably @calcit/procs@0.13.75).
package.json Bumps @calcit/procs and aligns package version to 0.0.4.
deps.cirru Updates Calcit and Respo dependency versions and project version metadata.
calcit.cirru Adds typed browser/extension traits, refactors focus handling via toggle-focus-within!, narrows visibility/action values, and updates return schemas.
config/calcit-quality.json Removes the legacy JSON quality baseline.
config/calcit-quality.cirru Adds the generated Cirru EDN quality baseline used by CI.
.github/workflows/upload.yaml Enforces caps --strict --ci and points quality checks at the Cirru baseline.
.gitattributes Marks the new quality baseline as generated text for GitHub linguist handling.
history/202609030040-typed-host-boundaries.md Records the rationale and validation steps for the typed-boundary and baseline migration.
Review details
  • Files reviewed: 8/9 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .gitattributes Outdated
@tiye
tiye force-pushed the codex/strict-dependency-chain-20260903 branch from 9fb24d0 to 7c99ef2 Compare September 2, 2026 16:57
@tiye
tiye merged commit 5a0c340 into main Sep 2, 2026
1 check passed
@tiye
tiye deleted the codex/strict-dependency-chain-20260903 branch September 2, 2026 16:59
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.

Narrow browser and extension FFI messages / 收窄浏览器与扩展 FFI 消息

2 participants