Conversation
Externalizes the compiled-in resource-kind table (ownlang/ownir.py _prelude_resources) into a declarative, symbol-resolved project config so a codebase can teach the extractor its own acquire/release conventions (e.g. ConnectionFactory.Open()/Connection.Close()) without a new hardcoded classifier in Program.cs. Grounded against P-014's semantic-resolution discipline and P-015/P-024's precedents so it stays a fact producer, not a second detection DSL.
|
Warning Review limit reached
Next review available in: 51 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a6d906c782
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| No change to `ownlang/`, `spec/OwnIR.md`, or the JSON schema — a project kind is | ||
| indistinguishable, downstream of fact emission, from a built-in one. The only |
There was a problem hiding this comment.
Include the required OwnIR changes for custom kinds
When a model declares a project-specific kind such as db connection, the current bridge cannot carry that through unchanged: OwnIR's resource discriminator is a closed vocabulary (spec/ownir.schema.json and ownlang/ownir.py::_KNOWN_RESOURCE_KINDS) and load() rejects unknown values, while existing lowering derives the displayed tag from the built-in kind. If implementers follow this proposal and add only an extractor-side loader, custom model entries will either fail to load or be reported under a built-in tag instead of [resource: <declared kind>]. Please either constrain models to existing discriminator/tag pairs or include the needed schema/core/prelude changes here.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Good catch, confirmed against the code — resource/[resource: …] is a closed, fixed-mapping vocabulary (ownlang/ownir.py::_KNOWN_RESOURCE_KINDS/_RESOURCES, pinned by spec/ownir.schema.json), and load() rejects an unknown value. Fixed in 9ae499a: v0 now binds project model entries to an existing discriminator (inheriting its already-fixed tag) instead of claiming a free-text kind/tag, with the precision loss and a scoped-out additive-schema follow-up called out explicitly (Open Question 6).
Generated by Claude Code
…ew ones Codex review on #186 caught it: the resource discriminator and its [resource: ...] tag are a closed, fixed-mapping vocabulary (ownlang/ownir.py::_KNOWN_RESOURCE_KINDS/_RESOURCES, pinned by spec/ownir.schema.json) that load() rejects unknown values for. v0 now explicitly binds project model entries to an existing discriminator instead of claiming a free-text kind/tag, with the precision loss and the scoped-out follow-up (an additive display_kind field) called out as Open Question 6.
|
Консолидировано в #190 (перенумеровано P-026 → P-031-resource-model-files). Закрываю в пользу единого PR. Generated by Claude Code |
Что и зачем
Добавляет
docs/proposals/P-026-resource-model-files.md— proposal на декларативные, per-project файлы моделей ресурсов (own.models.yaml), которые позволяют объявлять свои acquire/release/capture-конвенции (например,ConnectionFactory.Open()/Connection.Close()), резолвя их через тот же project-localSemanticModel, что уже использует P-014, без добавления нового hardcoded classifier вProgram.cs. Идея внешне предложена ревьюером как аналог Coverity custom models; я сверил её с существующим кодом/документами репозитория (ownlang/ownir.py:_prelude_resources(), P-014, P-015, P-024) и оформил как отдельный proposal с явным разграничением от P-015 (config surface) и объяснением, почему это не повторяет DSL, отвергнутый в P-024.Тип изменения
Как проверено
python tests/run_tests.pyruff check .иmypypython scripts/<...>.py --selftest)Изменение чисто документационное (новый
docs/proposals/*.md+ запись в индексеdocs/proposals/README.md), кода не касается — прогонять тесты/линтеры не требовалось.Связанные issue
Нет — инициировано обсуждением в чате, не привязано к issue.
Чеклист
docs/proposals/README.mdfeat:,fix:,docs:…)Generated by Claude Code