Skip to content

[#366] 🤖 - Add repository locale and safe request adaptation - #366

Merged
efraespada merged 4 commits into
developfrom
codex/repository-locale-foundation
Sep 14, 2026
Merged

efraespada merged 4 commits into
developfrom
codex/repository-locale-foundation

Conversation

@efraespada

@efraespada efraespada commented Sep 14, 2026 •

Copy link
Copy Markdown
Member

📌 Summary

Adds canonical repository locale support with English (en-US) as the default, while allowing issue and pull-request locale overrides to inherit or replace it.

Reworks addressed-comment translation into one non-mutating language-adaptation step that preserves human-authored comments and technical tokens.


🎯 Related Issues / Tickets


🧩 Scope of Changes

  • Added:
    • Repository locale configuration with BCP-47 validation and canonicalization.
    • Locale inheritance for issue and pull-request surfaces.
    • Safe request adaptation for addressed comments.
    • Translation context in direct Think responses when adaptation occurs.
  • Updated:
    • Action inputs, setup workflows, prompts, documentation, tests, and generated bundles.
    • Comment automation to adapt only eligible prose after admission and authorization.
  • Removed:
    • The previous two-call language-check and translation flow.
    • Automatic mutation of source comments.
  • Refactored:
    • Locale handling into a domain policy.
    • Comment translation into a single result-producing adaptation workflow.

🛠️ Technical Details

  • Empty issue and pull-request locale inputs inherit repository-locale; explicit overrides remain authoritative.
  • Locale tags are validated and canonicalized with Intl, accepting underscore forms such as pt_BR during migration and emitting pt-BR.
  • Adaptation runs once and returns interpreted context to downstream workflows instead of updating GitHub comments.
  • Commands, mentions, paths, refs, flags, URLs, identifiers, and quoted literals are preserved.
  • Unsafe, ambiguous, invalid, or failed adaptation results fail closed without running requested mutations.
  • Existing translation markers remain recognized for idempotency.
  • Human-authored comments remain unchanged; escaped translation context is published only with the bot response when translation occurs.

🔍 How to Test

  1. Use Node.js 24 and install dependencies with pnpm install.
  2. Run pnpm test, pnpm run typecheck, and pnpm run lint.
  3. Run pnpm run build and verify the generated bundles.
  4. Run:
    • pnpm run validate:documentation
    • pnpm run validate:workflows
    • pnpm run validate:specifications
  5. Configure repository, issue, and pull-request locales and verify inheritance, explicit overrides, underscore migration, and malformed-tag rejection.
  6. Exercise addressed comments in matching and foreign languages, confirming that source comments remain unchanged and technical tokens are preserved.

🧪 Test Coverage

  • Unit tests
  • Integration tests
  • End-to-end (E2E) tests
  • Manual testing only

Verification covers 416 test suites and 3,596 tests.


📸 Screenshots / Recordings (UI changes only)

Not applicable.


⚠️ Breaking Changes

  • None

🚀 Deployment Notes

  • Requires database migration
  • Requires environment variable changes
  • Requires feature flag toggle
  • No special deployment steps

Details: Existing locale variables remain supported as explicit issue and pull-request overrides. Empty values now inherit repository-locale.


🔒 Security Considerations

  • No security impact
  • Input validation changes
  • Authentication / authorization changes
  • Sensitive data handling changes

Locale configuration is validated before workflow execution. User comments and model output remain untrusted, bounded, and sanitized. Unsafe adaptation fails closed without mutation.


📈 Performance Impact

  • No performance impact
  • Improves performance
  • Potential performance regression

Replaces the previous language-check and translation sequence with one bounded adaptation call.


📝 Notes for Reviewers

Please pay particular attention to:

  • Locale inheritance and BCP-47 canonicalization.
  • Preservation of commands, mentions, paths, refs, flags, and URLs.
  • The guarantee that source comments are never edited.
  • Fail-closed behavior for invalid or unsafe adaptation responses.

✅ Checklist

  • I have self-reviewed my code
  • Code follows project standards and conventions
  • Tests have been added or updated
  • Documentation has been updated
  • No new warnings or lint errors
  • Breaking contract changes and required consumer updates are documented

📚 Additional Context

This is the first implementation increment for the semantic GitHub publication and repository localization SDDs. Verification includes TypeScript, ESLint, production bundles, documentation contracts, workflow validation, specification validation, and graphify updates.

@docs-page

docs-page Bot commented Sep 14, 2026

Copy link
Copy Markdown

To preview the documentation for this pull request, visit the following URL:

docs.page/vypdev/copilot~366

Documentation is deployed and generated using docs.page

@vypbot vypbot changed the title Add repository locale and safe request adaptation [#366] 🤖 - Add repository locale and safe request adaptation Sep 14, 2026
@vypbot
vypbot self-requested a review September 14, 2026 11:30
@vypbot vypbot added this to vypdev Sep 14, 2026
@vypbot vypbot moved this to In Progress in vypdev Sep 14, 2026
@vypbot
vypbot changed the base branch from develop to master September 14, 2026 11:30
@vypbot
vypbot changed the base branch from master to develop September 14, 2026 11:31
@codecov-commenter

codecov-commenter commented Sep 14, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.14286% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.73%. Comparing base (274db40) to head (8251c00).
⚠️ Report is 685 commits behind head on develop.

Files with missing lines Patch % Lines
...pplication/usecases/comment_automation_use_case.ts 76.92% 0 Missing and 3 partials ⚠️
...ps/common/comment_language_translation_workflow.ts 92.50% 0 Missing and 3 partials ⚠️
src/domain/locale.ts 92.85% 1 Missing and 2 partials ⚠️
...ication/policies/setup_configuration_validation.ts 87.50% 1 Missing ⚠️
...ion/usecases/steps/common/think_answer_workflow.ts 50.00% 0 Missing and 1 partial ⚠️
src/data/model/locale.ts 90.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #366      +/-   ##
===========================================
+ Coverage    90.94%   91.73%   +0.79%     
===========================================
  Files          135      633     +498     
  Lines         6251    15973    +9722     
  Branches      1338     4082    +2744     
===========================================
+ Hits          5685    14653    +8968     
- Misses         172      530     +358     
- Partials       394      790     +396     
Files with missing lines Coverage Δ
src/actions/configuration_builders.ts 100.00% <100.00%> (ø)
src/actions/github_action_execution.ts 91.83% <ø> (ø)
src/actions/github_action_locale_inputs.ts 100.00% <100.00%> (ø)
src/actions/local_action_configuration_sections.ts 89.06% <100.00%> (ø)
src/actions/local_action_execution.ts 92.30% <ø> (ø)
src/application/contracts/input_keys.ts 100.00% <ø> (ø)
src/application/policies/agent_response_schemas.ts 100.00% <100.00%> (ø)
...application/policies/comment_translation_policy.ts 97.29% <100.00%> (ø)
...plication/policies/setup_configuration_defaults.ts 97.29% <ø> (ø)
...c/application/policies/setup_configuration_plan.ts 97.76% <100.00%> (ø)
... and 18 more

... and 666 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vypbot

vypbot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

🤖 Bugbot status

Current status: The review of 8251c00 has partial coverage and cannot declare the whole pull request clean.

Action required: Run /copilot recheck; the technical details identify what remains pending.

Current state

State Count
Open / reopened 0
Verification required 0
Fixed 0
Obsolete 0
Dismissed 0
Unknown 0

Findings

  • No findings recorded.

Coverage

  • selection: complete; retained=1
  • issue-comments: complete; retained=4
  • pull-request-comments: complete; retained=0
  • review-threads: complete; retained=0
  • diff: partial; retained=35, omitted=14
  • previous-findings: complete; retained=0
  • human-conversation: partial; retained=3, truncated=1
  • rules: complete; retained=0

Pull request · Verified commit · Workflow run

Technical details

Projection: partial · Analyzed head: 8251c00 · Digest: 61a64f8c

No pending operations.

Written by vypdev/copilot for commit 8251c0005c14d53779ced5a78030bdccb49ffef0. This will update automatically on new commits.

@efraespada

Copy link
Copy Markdown
Member Author

/copilot recheck

@efraespada
efraespada merged commit 3758321 into develop Sep 14, 2026
11 of 12 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in vypdev Sep 14, 2026
@vypbot

vypbot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

✨ Feature Actions

  1. Lifecycle state synchronized to verified.

  2. Waiting state cleared.

image

Debug log
[DEBUG] Setup done. Issue number: 366, isSingleAction: false, isIssue: false, isPullRequest: true, isPush: false
[INFO] Running PullRequestUseCase for PR #366.
[INFO] 🔀 Executing PullRequestUseCase.
[DEBUG] PR action closed
[DEBUG] PR isOpened false
[DEBUG] PR isMerged true
[DEBUG] PR isClosed true
[INFO] ✅ Executing CloseIssueAfterMergingUseCase.
[DEBUG] Issue #366 state: closed
[DEBUG] Issue #366 is already closed.
[DEBUG] Issue #366 was already closed or close failed after merge.
[INFO] Main run finished. Results: 1, total steps: 0.
[INFO] Publishing result: 2 result(s), 2 step(s), 0 error(s).
[INFO] 📄 Executing PublishResultUseCase.

🚀 Happy coding!

Made with ❤️ by vypdev/copilot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants