Skip to content

objectui 的 eslint 没开 no-console:模块作用域遗留调试输出没有任何自动化拦网(#7139 靠人工发现) #7146

Closed as not planned

Description

@yinlianghui

观察类(不影响当前用户:唯一已知实例已由 objectstack#7139 / objectui PR #4007 删除)。发现于 objectstack#7139 的实施过程。

事实

objectui 仓根 eslint.config.js 没有配置 no-console 规则(全仓 grep no-console 零命中)。因此 objectstack#7139 那句位于模块作用域、加载即打印的 console.log('Registering object-map...') 从落库到被发现,一路没有任何自动化环节报过它 —— pnpm lint 对它完全沉默,是靠人工阅读发现的。

修 #7139 时顺带核实过:packages/plugin-*/src/index.tsx 19 个文件里,这类会执行的遗留调试输出目前只有那一处(plugin-editor 的命中是 defaultProps.value 示例代码字符串)。也就是说现在仓库是干净的,这条单纯粹是「拦网缺失」,不是「有 bug 待修」。

为什么不在 #7139 的 PR 里顺手开

开 no-console 是影响多个包的策略决定,不是 XS 单能顺带夹带的改动,至少要先答三个问题:

  1. 有意保留的诊断怎么豁免。 仓里存在大量刻意的 console.warn / console.error 运行时诊断,例如 packages/plugin-map/src/ObjectMap.tsx 三处(无效 map 配置、API provider 未实现、取 schema 失败),以及 packages/core/src/registry/Registry.ts 里 register() 按设计发的缺 namespace / 裸名 fallback 冲突告警。合理形态大概是 no-console: ['error', { allow: ['warn', 'error'] }],但这需要确认「debug 噪音走 log/info/debug、诊断走 warn/error」是否就是本仓想要的约定。
  2. 是否该有 debug 通道。 plugin-map 在模块作用域 console.log('Registering object-map...'):每次加载该 plugin 都往控制台打一行 #7139 原文提过「或按需换成 debug 通道」。如果仓里应有统一的 debug 输出设施(packages/core/src/utils/debug-collector.ts 似乎已有相关设施,未细看),规则应该配合它一起定,而不是只堵不疏。
  3. 落地成本与噪音量未测。 开启前需要跑一遍全仓看现存命中数,决定是 error 一次性清干净,还是先 warn 逐步收敛。示例代码、脚本(scripts/**)、测试文件通常要单独 override。

建议

由 PM 分诊决定要不要做、以什么范围做。若要做,建议独立 PR:先统计全仓命中,再定 allow 列表与 overrides,附一条针对「模块作用域 debug 输出」的说明。真正想守的不变量是「import 一个包不该往使用者控制台写噪音」—— PR #4007 已用 packages/plugin-map/src/index.registration.test.tsx 把这条钉在 plugin-map 上(spy log/info/debug 后 vi.resetModules() 再 import,断言零输出),那个测试形态可以直接复制到其他 plugin,是比 lint 规则更贴近意图的另一条路,两者不互斥。

相关:objectstack#7139(缺陷本体)、objectui PR #4007(修复 + 单包钉子)。

Activity

  1. added
    repo:objectuiSeam card: cross-repo ordering with objectui is the substance (pure objectui fixes live in objectui)
    findingRecorded observation — held, not dispatchable until the findings triage round grades it
    on Aug 9, 2026
  2. os-zhuang commented on Aug 10, 2026

    @os-zhuang
    Contributor

    Finding-triage ruling: Promote — finding to pm:queue.

    Scoped tooling-gate fix: objectui's eslint has no no-console rule (0 hits in eslint.config.js on objectui origin/main @ 94d1d82), so module-scope debug output has no automated net — #7139 was caught by hand and its console.log is still live at plugin-map/src/index.tsx:64 pending PR objectui#4007. That PR's test already pins the invariant (import must not write console noise); the lint rule (no-console with warn/error allowances) closes the class.

    Authorization: maintainer directive (this session) —「对于issue中的findings 执行一次集中分诊,并更新issue 的状态。」Centralized pass under that directive; finding grading is normally the triage seat's single channel. Round: objectstack#4949 finding-triage, 2026-08-10.
    Session: 01JaVVMrSxt7Tgi1uwEuDtH7


    Generated by Claude Code

  3. added
    pm:queueReady for the PM dispatch loop
    and removed
    findingRecorded observation — held, not dispatchable until the findings triage round grades it
    on Aug 10, 2026
  4. os-zhuang commented on Aug 10, 2026

    @os-zhuang
    Contributor

    Migrated to objectstack-ai/objectui#4029 under #7167 (file-at-destination ruling, maintainer 2026-08-10). Native GitHub issue transfer is not available to this session's credential, so the card was recreated at the destination; this thread stays as the authoritative history and is linked from the new card. Closing as not planned here — moved, not rejected.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    pm:queueReady for the PM dispatch looprepo:objectuiSeam card: cross-repo ordering with objectui is the substance (pure objectui fixes live in objectui)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions