Skip to content

docs: expand FUNCTIONAL_REQUIREMENTS with protocol and FFI FRs#40

Merged
KooshaPari merged 1 commit into
mainfrom
docs/real-specs
Mar 27, 2026
Merged

docs: expand FUNCTIONAL_REQUIREMENTS with protocol and FFI FRs#40
KooshaPari merged 1 commit into
mainfrom
docs/real-specs

Conversation

@KooshaPari

Copy link
Copy Markdown
Owner

Adds FR-PROTO section covering apps/runtime TypeScript protocol layer (topic registry, EventEnvelope, ordered subscriber delivery) which was missing from the existing FR. Also adds FR-PROTO-005/006 clarifying Go and Python FFI bindings. Total FRs: 28 → 34.

Adds FR-PROTO section covering apps/runtime TypeScript protocol layer
(topic registry, method registry, EventEnvelope, ordered delivery) and
clarifies FR-FFI coverage for Go and Python bindings.
Total FRs: 28 -> 34.
@KooshaPari KooshaPari merged commit 7ef8168 into main Mar 27, 2026
0 of 2 checks passed
@KooshaPari KooshaPari deleted the docs/real-specs branch March 27, 2026 09:58
@coderabbitai

coderabbitai Bot commented Mar 27, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@KooshaPari has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 20 minutes and 41 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 20 minutes and 41 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: ac540326-417a-4b57-975b-749aeb116186

📥 Commits

Reviewing files that changed from the base of the PR and between c57182b and 5565876.

📒 Files selected for processing (1)
  • FUNCTIONAL_REQUIREMENTS.md

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key(s) in object: 'pre_merge_checks', 'pr_validation'
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/real-specs

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request updates the functional requirements for the phenotype-config project, specifically adding specifications for the Local Bus Protocol and FFI bridges. The review feedback highlights several discrepancies between the new documentation and the existing implementation, such as incomplete topic lists and mismatched function or module names in the FFI sections.

## FR-PROTO: Local Bus Protocol (apps/runtime)

### FR-PROTO-001: Topic Registry
**SHALL** define a canonical topic registry (`TOPICS` constant in `apps/runtime/src/protocol/topics.ts`) listing all pub/sub event topic strings: `workspace.opened`, `project.ready`, `session.created`, `session.attached`, `session.attach.started`, `session.attach.failed`, `session.restore.started`, `session.restore.completed`, `session.terminated`, `terminal.spawn.started`, `terminal.spawned`, `terminal.spawn.failed`, `terminal.output`, `terminal.state.changed`, `renderer.switch.started`, `renderer.switch.succeeded`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The list of pub/sub event topics in FR-PROTO-001 is not exhaustive. The TOPICS constant in apps/runtime/src/protocol/topics.ts contains additional topics such as renderer.switch.failed, agent.run.started, approval.requested, etc. Please update the functional requirement to reflect the complete list of topics for accuracy.

**Code:** `apps/runtime/src/protocol/topics.ts`

### FR-PROTO-005: Go FFI Protocol Bridge
**SHALL** expose the `pheno-ffi-go` crate (`crates/pheno-ffi-go`) as a C ABI that the Go runtime layer can link against; the generated header SHALL include at minimum `pheno_config_get`, `pheno_config_set`, `pheno_flag_get`, `pheno_flag_enable`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

FR-PROTO-005 states that pheno_flag_get should be included in the generated header for the Go FFI. However, the crates/pheno-ffi-go/src/lib.rs file does not appear to export a function named pheno_flag_get. It exposes pheno_flag_list, pheno_flag_enable, and pheno_flag_disable. Please clarify if this function is intended to be exposed, or if the documentation should be updated to reflect the actual exposed flag-related functions.

**Code:** `crates/pheno-ffi-go/`

### FR-PROTO-006: Python FFI Protocol Bridge
**SHALL** expose the `pheno-ffi-python` crate (`crates/pheno-ffi-python`) as a PyO3 extension module importable as `import pheno`; all functions SHALL release the GIL during SQLite I/O.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

FR-PROTO-006 specifies that the Python FFI module should be importable as import pheno. However, the #[pymodule] attribute in crates/pheno-ffi-python/src/lib.rs defines the module name as phenotype_config. This discrepancy should be resolved to ensure consistency between the documentation and the implementation.

@KooshaPari KooshaPari added pr-created PR was created labels Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-created PR was created

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants