Skip to content

feat(effect): function effect row + call-graph composition (ADR-0009 D1+D3)#42

Merged
hyperpolymath merged 1 commit into
mainfrom
claude/dazzling-albattani-ubS9r
Jun 18, 2026
Merged

feat(effect): function effect row + call-graph composition (ADR-0009 D1+D3)#42
hyperpolymath merged 1 commit into
mainfrom
claude/dazzling-albattani-ubS9r

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

(b) — the composition slice. Implements ADR-0009 D1+D3: the function effect row and its composition across calls.

  • FunctionEffect { echo, epi } — a point in the product lattice Echo × Epistemic, joined componentwise.
  • own_effect(func) — a function's effect from its body alone (function_echo + function_epistemic).
  • resolved_effects(program) — joins in the effects of called functions, transitively, via a monotone fixpoint over the call graph. The effect lattice is finite (3×3) and join is monotone, so it terminates — recursion and mutual recursion included (pinned by a test).

This is the operational heart of "Echo+Epistemic compose through calls": it works over the existing AST via an effect environment, so no invasive AST-field changes (storing the grade on TypeAnnotation::Function for surface annotations/display is a later, optional slice).

4 tests: own-effect resolution; epistemic and echo composing through a call; recursion terminates. clippy -D warnings clean; #[forbid(unsafe_code)]; no unwrap_or.

(b) status after this: design (ADR-0009) ✓ · echo inference ✓ · epistemic inference ✓ · call composition ✓. Remaining (b): mechanise the function-effect lattice + composition law in JtvEcho.lean. Then number-systems.

https://claude.ai/code/session_01BJmfoz1ZS1Pejy9LLMY742


Generated by Claude Code

…D1+D3)

The composition half of Echo+Epistemic-as-function-effects. FunctionEffect is the
product-lattice grade (echo, epi); own_effect reads a function body (function_echo
+ function_epistemic); resolved_effects joins in the effects of called functions
transitively via a monotone fixpoint over the call graph (finite lattice, so it
terminates; handles recursion and mutual recursion).

Analysis over the existing AST via an effect environment -- no AST-field changes
yet (storing the grade on TypeAnnotation::Function is a later surface-wiring slice).

Additive new module; 4 tests (own effect; epistemic + echo composing through a
call; recursion terminates); clippy -D warnings clean.

https://claude.ai/code/session_01BJmfoz1ZS1Pejy9LLMY742
@hyperpolymath
hyperpolymath marked this pull request as ready for review June 18, 2026 02:00
@hyperpolymath
hyperpolymath merged commit 2844aaa into main Jun 18, 2026
22 of 25 checks passed
@hyperpolymath
hyperpolymath deleted the claude/dazzling-albattani-ubS9r branch June 18, 2026 02:00
@github-actions

Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 51 issues detected

Severity Count
🔴 Critical 0
🟠 High 25
🟡 Medium 26
View findings
[
  {
    "reason": "No test directory or test files found",
    "type": "no_tests",
    "file": "/home/runner/work/julia-the-viper/julia-the-viper",
    "action": "flag",
    "rule_module": "honest_completion",
    "severity": "high",
    "deduction": 20
  },
  {
    "reason": "Issue in secret-scanner.yml",
    "type": "missing_workflow",
    "file": "secret-scanner.yml",
    "action": "create",
    "rule_module": "workflow_audit",
    "severity": "high"
  },
  {
    "reason": "Issue in scorecard.yml",
    "type": "scorecard_wrapper_missing_job_permissions",
    "file": "scorecard.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "high"
  },
  {
    "reason": "unwrap() without prior check -- DoS via panic (10 occurrences, CWE-754)",
    "type": "unwrap_without_check",
    "file": "/home/runner/work/julia-the-viper/julia-the-viper/crates/jtv-core/benches/interpreter_bench.rs",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "high"
  },
  {
    "reason": "unwrap() without prior check -- DoS via panic (6 occurrences, CWE-754)",
    "type": "unwrap_without_check",
    "file": "/home/runner/work/julia-the-viper/julia-the-viper/crates/jtv-core/benches/parser_bench.rs",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "high"
  },
  {
    "reason": "Js.Array2 deprecated -- use Array (3 occurrences)",
    "type": "deprecated_api",
    "file": "/home/runner/work/julia-the-viper/julia-the-viper/vscode-extension/src/Extension.res",
    "action": "search_replace",
    "rule_module": "migration_rules",
    "severity": "high"
  },
  {
    "reason": "Js.Promise deprecated -- use Promise (2 occurrences)",
    "type": "deprecated_api",
    "file": "/home/runner/work/julia-the-viper/julia-the-viper/vscode-extension/src/Extension.res",
    "action": "module_replace",
    "rule_module": "migration_rules",
    "severity": "medium"
  },
  {
    "reason": "Belt.Array deprecated -- use Array (30 occurrences)",
    "type": "deprecated_api",
    "file": "/home/runner/work/julia-the-viper/julia-the-viper/packages/jtv-analyzer/src/Main.res",
    "action": "module_replace",
    "rule_module": "migration_rules",
    "severity": "high"
  },
  {
    "reason": "Belt.Option deprecated -- use Option (2 occurrences)",
    "type": "deprecated_api",
    "file": "/home/runner/work/julia-the-viper/julia-the-viper/packages/jtv-analyzer/src/Main.res",
    "action": "module_replace",
    "rule_module": "migration_rules",
    "severity": "medium"
  },
  {
    "reason": "Js.Array2 deprecated -- use Array (7 occurrences)",
    "type": "deprecated_api",
    "file": "/home/runner/work/julia-the-viper/julia-the-viper/packages/jtv-analyzer/src/Main.res",
    "action": "search_replace",
    "rule_module": "migration_rules",
    "severity": "high"
  }
]

Powered by Hypatia Neurosymbolic CI/CD Intelligence

hyperpolymath pushed a commit that referenced this pull request Jun 18, 2026
#42 merged with a failing `cargo fmt --check`: effect.rs had two unformatted
spots (a wide match arm and a wrapped test arg), leaving main's Check red.
`cargo fmt` only -- no code change. build / clippy -D warnings / tests green.

https://claude.ai/code/session_01BJmfoz1ZS1Pejy9LLMY742
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.

2 participants