Repository navigation
feat(core): hotsrm v0.1 — internal workbench for supplier master data, admission and qualification alerts - #5
Merged
Conversation
Add the package skeleton for v0.1: src/core as the type: app stack (namespace srm) with the srm_workbench app shell and the srm_category object, objectstack.config.ts composing it per ADR-0002, a boot test on @objectstack/verify, and a CI workflow running validate, lint, typecheck, i18n check, test, build and the governance template checks. Claude-Session: https://claude.ai/code/session_01V33WdUYdE8Qfx121Ngt8Lt Co-authored-by: Claude <noreply@anthropic.com>
Use the app.objectstack.<name> manifest id, pin @objectstack/* to 18.0.0 with a packageManager field, run lint --strict, add the objectstack.composition.ts / objectstack.manifest.json pair the README already planned, declare auth and ui so pnpm dev serves the console, and add a verify script running the full local check list. Claude-Session: https://claude.ai/code/session_01V33WdUYdE8Qfx121Ngt8Lt Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V33WdUYdE8Qfx121Ngt8Lt Co-authored-by: Claude <noreply@anthropic.com>
Add srm_plant, srm_supplier, srm_supplier_contact, srm_supplier_certificate and srm_supplier_category per design 02 §4.1, the shared srm_country and srm_cert_type picklists, list views, workbench navigation, full English translations and example seed data. Supplier identity is deduplicated by credit code or country + registration number, status follows the 02 §5.1 state machine. contact_role is renamed contact_function because the platform reserves "role". Design 07 now records how phase 1 is split into v0.1–v0.4. Claude-Session: https://claude.ai/code/session_01V33WdUYdE8Qfx121Ngt8Lt Co-authored-by: Claude <noreply@anthropic.com>
Add srm_supplier_application (internal v0.1 subset of design 02 §4.2) with its state machine and guards, and three record-change flows for P1 (design 03 §3): intake moves the supplier to qualifying and the application to document review; admission review runs two approvals (the reviewer, then the srm_procurement_director position) and on approval qualifies the supplier and grants each applied category; rejection returns the supplier to potential. The app now requires automation, triggers and approvals. Claude-Session: https://claude.ai/code/session_01V33WdUYdE8Qfx121Ngt8Lt Co-authored-by: Claude <noreply@anthropic.com>
Add the daily srm_certificate_expire_sweep, a catch-up and idempotent sweep that aligns certificate status with valid_to (expired, expiring within 30 days, or valid again after renewal), and srm_supplier_qualification_recalc, which raises or clears the supplier's qualification_alert whenever a certificate's status or mandatory flag changes (design 03 §11, FR-902). Notifications and SQE verification gating are deferred to the portal version, as noted in design 03. Claude-Session: https://claude.ai/code/session_01V33WdUYdE8Qfx121Ngt8Lt Co-authored-by: Claude <noreply@anthropic.com>
Add the v0.1 subset of design 04 §2: five positions (procurement director, category manager, buyer, SQE, SRM admin) and five permission sets (internal base, supplier admin, quality, executive, admin), none of them default. Flow-owned status fields are read-only in every set. Tests cover read-only buyers, category managers registering suppliers and applying for admission, and the status field being closed to direct edits. Claude-Session: https://claude.ai/code/session_01V33WdUYdE8Qfx121Ngt8Lt Co-authored-by: Claude <noreply@anthropic.com>
Without them the stack boots but scheduled flows, notifications and field history (trackHistory) silently do nothing. Also note in the README that scheduled flows need OS_AUTOMATION_SCHEDULED_WORK_ENABLED, which the platform turns off by default. Claude-Session: https://claude.ai/code/session_01V33WdUYdE8Qfx121Ngt8Lt Co-authored-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V33WdUYdE8Qfx121Ngt8Lt
Seeds replay on every boot; upsert reset a seeded supplier's status back to potential after it had been approved. Use ignore so seeds only fill gaps. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V33WdUYdE8Qfx121Ngt8Lt
marchtian
pushed a commit
that referenced
this pull request
Oct 23, 2026
Resolve README, 02 and 07 against the 2026-10-23 route: keep the v0.1–v0.7 table, drop the superseded 07 §1.1 split (portal at v0.2, sourcing at v0.3), keep the v0.1 subset notes from #5 with versions re-pointed. Claude-Session: https://claude.ai/code/session_011FUtVGdJNj6NEXtstKJDNQ Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by 田騏 · project thread
改了什么
hotsrm v0.1:内部工作台上的供应商主数据、准入审批和资质到期预警(范围见 design 07 §1.1)。每个工作项一个提交。
W1 工程骨架与 CI(结构对齐 HotCRM)
src/core/index.ts:核心应用(type: app,idapp.objectstack.hotsrm,命名空间srm,默认 zh-CN,另有 en);requires声明 auth、ui、automation、triggers、job、approvals、messaging、audit。objectstack.composition.ts选模块,objectstack.config.ts用composeStacks(..., { manifest: 'preserve' })合成(ADR-0002);objectstack.manifest.json。@objectstack/*固定 18.0.0;pnpm verify跑全部检查;CI 跑 validate、lint --strict、typecheck、i18n check --strict、test、build 和体系文件检查。W2 供应商主数据(02 §4.1)
srm_category、srm_plant、srm_supplier、srm_supplier_contact、srm_supplier_certificate、srm_supplier_category;共享选项列表srm_country、srm_cert_type。contact_role改名contact_function(平台保留 role 一词),02 同步。W3 准入申请与审批(02 §4.2、03 §3)
srm_supplier_application(v0.1 内部代录子集,02 已加说明)。srm_application_intake(受理)、srm_admission_approval(两级审批:初审人 →srm_procurement_director;批准后申请通过、供应商合格、按申请品类建供货品类资格;驳回退回资料审核)、srm_admission_rejection(未通过:供应商回到潜在)。W4 资质到期扫描(03 §11)
srm_certificate_expire_sweep:每日追赶式扫描,证书状态对齐到已过期 / 即将到期(30 天)/ 有效(延期后恢复),可重复运行。srm_supplier_qualification_recalc:证书状态或「必备」标志变化后重算qualification_alert。OS_AUTOMATION_SCHEDULED_WORK_ENABLED控制,平台默认关闭(托管云同样)。不打开时扫描不会运行,托管云的打开方式待与平台确认(README 已注明)。is_mandatory、「经 SQE 核验才解除」随门户版本加入(03 已加说明)。W5 岗位与权限集(04 §2)
isDefault;flow 维护的状态字段在所有权限集里只读。暂不包含:门户与公开注册表单(v0.2)、寻源(v0.3)、ERP / 物料 / 银行账户(v0.4)、首页看板。
为什么
先交付一个能独立使用的内部闭环:登记供应商 → 准入两级审批 → 合格;证书过期自动标记资质异常。不含面向供应商的对象和报价,隔离与封标两条红线随 v0.2 / v0.3 的对象与测试一起落地。
怎么验证的
本地
pnpm verify全部通过:validate、lint --strict、typecheck、i18n(zh-CN / en 171/171)、build,以及 28 个端到端测试(启动 3、主数据 9、准入 5、资质 6、权限 5),体系文件两项检查通过。🤖 Generated with Claude Code
https://claude.ai/code/session_01V33WdUYdE8Qfx121Ngt8Lt