Skip to content

feat: add language restriction profiles#76

Merged
konard merged 2 commits into
issue-47-76af108c0f24from
issue-59-429354ff0512
Jun 11, 2026
Merged

feat: add language restriction profiles#76
konard merged 2 commits into
issue-47-76af108c0f24from
issue-59-429354ff0512

Conversation

@konard

@konard konard commented Jun 11, 2026

Copy link
Copy Markdown
Member

Fixes #59

Summary

  • Added a LanguageProfile API that declares queryable profile, link-type, concept, and translation-rule capability links in a LinkNetwork.
  • Added ParseConfiguration::with_profile("JavaScript") to materialize the built-in JavaScript profile during parse.
  • Added LinkNetwork::replace_with_profile so JS-to-JS rewrites validate a candidate result before commit; rejected rewrites leave source text unchanged and add a language-profile:unsupported-feature diagnostic link.
  • Added profile derivation from TranslationRuleSet domains and concept-domain validation for computed profiles.
  • Added a bump: minor changelog fragment.

Reproduction / Verification

  • Added tests/unit/language_profile.rs covering queryable profile links, configured JavaScript profile materialization, allowed JS-to-JS identifier rewrite, rejected out-of-profile JS syntax with diagnostic link, and rule-set-derived profile domains.

Local Checks

  • cargo fmt --check
  • cargo build
  • cargo clippy --all-targets --all-features
  • cargo test --test unit language_profile
  • cargo test --all-features (169 unit tests + 3 doc tests)
  • rust-script scripts/check-no-src-tests.rs
  • rust-script scripts/check-file-size.rs (passes; existing warnings remain for src/query.rs and src/link_network.rs near the threshold)
  • rust-script scripts/check-changelog-fragment.rs
  • rust-script scripts/check-version-modification.rs (skipped locally because GITHUB_EVENT_NAME is unset)
  • rust-script scripts/check-crate-size.rs
  • git diff --check

No UI changes; screenshots are not applicable.

Adding .gitkeep for PR creation (default mode).
This file will be removed when the task is complete.

Issue: #59
@konard konard self-assigned this Jun 11, 2026
@konard konard changed the title [WIP] Single-language restriction profiles (e.g. JavaScript-to-JavaScript mode) feat: add language restriction profiles Jun 11, 2026
@konard konard marked this pull request as ready for review June 11, 2026 14:33
@konard

konard commented Jun 11, 2026

Copy link
Copy Markdown
Member Author

Working session summary

Implemented issue #59 and updated PR #76: #76

What changed:

  • Added queryable LanguageProfile support, including a built-in JavaScript profile.
  • Added profile links to parsed networks via ParseConfiguration::with_profile.
  • Added profiled transforms with diagnostics for rejected out-of-profile results.
  • Added profile derivation from TranslationRuleSet.
  • Added unit coverage for profile declaration, JS in-profile transforms, rejected unsupported syntax, diagnostics, and rule-set composition.
  • Added a bump: minor changelog fragment.

Verification:

  • Local checks passed: cargo fmt --check, cargo build, cargo clippy --all-targets --all-features, cargo test --all-features, repository script checks, and git diff --check.
  • PR is ready, branch is pushed, working tree is clean.
  • Latest CI run passed on head commit a5fe8d17ec40b18b433ca359a2c8c736ca597577: https://github.com/link-foundation/meta-language/actions/runs/27354393312

This summary was automatically extracted from the AI working session output.

@konard

konard commented Jun 11, 2026

Copy link
Copy Markdown
Member Author

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Model: GPT-5.5
  • Provider: OpenAI
  • Public pricing estimate: $11.841945

📊 Context and tokens usage:

  • 301.9K / 1.1M (29%) input tokens, 30.2K / 128K (24%) output tokens

Total: (301.9K + 7.5M cached) input tokens, 30.2K output tokens, $11.841945 cost

🤖 Models used:

  • Tool: OpenAI Codex
  • Requested: gpt-5.5
  • Model: GPT-5.5 (gpt-5.5)

📎 Log file uploaded as Repository (38689KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard konard merged commit 4f56008 into issue-47-76af108c0f24 Jun 11, 2026
13 checks passed
@konard

konard commented Jun 11, 2026

Copy link
Copy Markdown
Member Author

🎉 Auto-merged

This pull request has been automatically merged by hive-mind.

  • All CI checks have passed

Auto-merged by hive-mind with --auto-merge flag

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.

1 participant