From 718d77fa74cf159290da65f902c9d58ef47b46df Mon Sep 17 00:00:00 2001 From: KiN3 <58543826+yehyakin@users.noreply.github.com> Date: Wed, 12 Aug 2026 05:39:22 +0800 Subject: [PATCH] Add community health and security guidance --- .github/ISSUE_TEMPLATE/bug_report.yml | 88 ++++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 8 ++ .github/ISSUE_TEMPLATE/feature_request.yml | 60 +++++++++++++++ .github/pull_request_template.md | 26 +++++++ CODE_OF_CONDUCT.md | 52 +++++++++++++ CONTRIBUTING.md | 44 +++++++++++ README.en.md | 8 ++ README.md | 8 ++ SECURITY.md | 33 ++++++++ SUPPORT.md | 15 ++++ scripts/validate.ps1 | 31 ++++++++ scripts/validate.sh | 40 +++++++++- tests/test_readme.py | 8 ++ tests/test_release_engineering.py | 10 +++ 14 files changed, 430 insertions(+), 1 deletion(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml create mode 100644 .github/pull_request_template.md create mode 100644 CODE_OF_CONDUCT.md create mode 100644 CONTRIBUTING.md create mode 100644 SECURITY.md create mode 100644 SUPPORT.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..fe4988c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,88 @@ +name: Bug report +description: Report a reproducible defect in Codex Sol Control +title: "[Bug]: " +labels: + - bug +body: + - type: markdown + attributes: + value: | + Thanks for reporting a defect. Search existing issues first and remove credentials, private paths, and private repository content. Security-sensitive reports must use private vulnerability reporting. + - type: checkboxes + id: preflight + attributes: + label: Preflight + options: + - label: I searched existing issues and reproduced this on the latest release or current main. + required: true + - label: This report contains no secrets or private project data. + required: true + - label: This is not a security vulnerability. + required: true + - type: input + id: version + attributes: + label: Version or commit + description: Provide the release tag or commit SHA you tested. + placeholder: v0.4.1 + validations: + required: true + - type: dropdown + id: operating-system + attributes: + label: Operating system + options: + - macOS + - Linux + - Windows + - Other + validations: + required: true + - type: input + id: codex-surface + attributes: + label: Codex surface and version + description: For example, Codex CLI or Codex Desktop and its version. + validations: + required: true + - type: dropdown + id: installation + attributes: + label: Installation method + options: + - install.sh + - install.ps1 + - Repository checkout only + - Other + validations: + required: true + - type: textarea + id: reproduction + attributes: + label: Reproduction steps + placeholder: | + 1. Run ... + 2. Invoke ... + 3. Observe ... + validations: + required: true + - type: textarea + id: expected + attributes: + label: Expected behavior + validations: + required: true + - type: textarea + id: actual + attributes: + label: Actual behavior + validations: + required: true + - type: textarea + id: evidence + attributes: + label: Redacted evidence + description: Include exact commands, exit codes, or logs after removing sensitive data. + render: shell + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..9ef8fa2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: Security vulnerability + url: https://github.com/yehyakin/codex-sol-control/security/advisories/new + about: Report suspected vulnerabilities privately. Do not open a public issue. + - name: Support guide + url: https://github.com/yehyakin/codex-sol-control/blob/main/SUPPORT.md + about: Check supported versions, environments, and the correct help channel. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..fd16bfd --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,60 @@ +name: Feature request +description: Propose a focused improvement to Codex Sol Control +title: "[Feature]: " +labels: + - enhancement +body: + - type: markdown + attributes: + value: | + Describe the user problem before the implementation. Proposals should preserve the single-controller architecture and avoid adding roles without clear evidence. + - type: checkboxes + id: preflight + attributes: + label: Preflight + options: + - label: I searched existing issues and pull requests for this proposal. + required: true + - label: This request is about Codex Sol Control rather than a downstream business project. + required: true + - type: textarea + id: problem + attributes: + label: Problem + description: What concrete limitation or repeated failure are you trying to solve? + validations: + required: true + - type: textarea + id: outcome + attributes: + label: Desired outcome + description: Describe observable acceptance criteria. + validations: + required: true + - type: textarea + id: proposal + attributes: + label: Proposed change + description: Keep this focused; implementation details are optional. + validations: + required: true + - type: textarea + id: alternatives + attributes: + label: Alternatives considered + validations: + required: true + - type: textarea + id: routing-impact + attributes: + label: Routing and safety impact + description: Note effects on Sol control, worker selection, permissions, write ownership, evidence, or fail-closed behavior. + validations: + required: true + - type: textarea + id: scope + attributes: + label: Scope boundaries + description: State what this proposal intentionally does not change. + validations: + required: true diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..f9e44dc --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,26 @@ +## Summary + +Describe the user-visible change. + +## Why + +Explain the problem and why this is the smallest sufficient change. + +## Scope + +- Changed: +- Intentionally unchanged: + +## Validation and evidence + +List exact commands, exit codes, and relevant runtime evidence. Distinguish local verification, hosted CI, installed state, and model/runtime observations. + +## Checklist + +- [ ] The change is focused and does not include unrelated refactors. +- [ ] Relevant contract or forward tests were added or updated. +- [ ] `README.md` and `README.en.md` remain aligned when shared facts changed. +- [ ] No credentials, private paths, or private repository data are included. +- [ ] Permission, write-ownership, exact-routing, and fail-closed boundaries are preserved. +- [ ] Claims are supported by fresh evidence and known limitations are explicit. +- [ ] Documentation and licensing attribution are complete. diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..3b36731 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,52 @@ +# Contributor Covenant Code of Conduct + +## Our pledge + +We pledge to make participation in this project a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socioeconomic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. + +## Our standards + +Examples of behavior that contributes to a positive environment include: + +- demonstrating empathy and kindness toward other people; +- respecting differing opinions, viewpoints, and experiences; +- giving and gracefully accepting constructive feedback; +- accepting responsibility, apologizing to those affected by mistakes, and learning from the experience; +- focusing on what is best for the community and the project. + +Examples of unacceptable behavior include: + +- sexualized language or imagery, sexual attention, or advances of any kind; +- trolling, insulting or derogatory comments, and personal or political attacks; +- public or private harassment; +- publishing another person's private information without explicit permission; +- other conduct that could reasonably be considered inappropriate in a professional setting. + +## Enforcement responsibilities + +Project maintainers are responsible for clarifying and enforcing these standards. They may remove, edit, or reject comments, commits, code, issues, and other contributions that do not align with this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. + +## Scope + +This Code of Conduct applies in all project spaces and when an individual officially represents the project in public spaces. + +## Reporting and enforcement + +Report abusive, harassing, or otherwise unacceptable behavior privately through the repository's [private vulnerability reporting form](https://github.com/yehyakin/codex-sol-control/security/advisories/new). Begin the report title with `Code of Conduct:` so it can be routed correctly. Do not include another person's private information in a public issue. + +Maintainers will review reports promptly, respect the privacy and safety of reporters, and apply consequences proportionate to the nature, impact, and persistence of the behavior. A maintainer who does not follow or enforce this Code of Conduct may be removed from the project team. + +## Enforcement guidelines + +Maintainers will use these guidelines when deciding consequences: + +1. **Correction** — a private warning and explanation for inappropriate language or behavior with limited community impact. +2. **Warning** — a warning with consequences for continued behavior when an incident or pattern has affected community members. +3. **Temporary ban** — a time-limited ban from project interaction for a serious or sustained violation. +4. **Permanent ban** — permanent removal for repeated violations, harassment, aggression, or other conduct harmful to the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant, version 2.1](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html), licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..9768920 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,44 @@ +# Contributing to Codex Sol Control + +Thank you for helping improve Codex Sol Control. Contributions should keep the project focused on one job: Sol controls planning, delegation, and review while bounded workers execute independently verifiable work. + +## Before you start + +- Search existing issues and pull requests before opening a new one. +- Use the bug or feature issue form for reproducible defects and proposals. +- Open an issue before a material routing, security, installer, or compatibility change. +- Use GitHub's [private vulnerability reporting](https://github.com/yehyakin/codex-sol-control/security/advisories/new) for security-sensitive reports. Do not disclose them in a public issue. + +## Development setup + +The repository requires Python 3.11 or newer. On macOS or Linux, run: + +```sh +bash scripts/validate.sh +bash scripts/test.sh +bash scripts/install.sh --check +``` + +On Windows, validate from PowerShell 5.1 or PowerShell 7: + +```powershell +powershell -NoProfile -ExecutionPolicy Bypass -File scripts/validate.ps1 +powershell -NoProfile -ExecutionPolicy Bypass -File tests/windows-lifecycle.ps1 +``` + +Use `pwsh` in place of `powershell` to exercise PowerShell 7. + +## Pull requests + +Keep each pull request focused and explain both the user-visible change and its evidence. A pull request should: + +- preserve user changes, permission boundaries, exact model routing, and fail-closed behavior; +- add or update the smallest relevant contract or forward test; +- keep `README.md` and `README.en.md` aligned when shared facts change; +- distinguish local tests, hosted CI, installed state, and runtime evidence; +- contain no credentials, private paths, private repository data, or generated test residue; +- avoid unrelated refactors, new roles, or duplicated implementations. + +Configure a verified GitHub email or GitHub-provided noreply email before committing so GitHub can attribute future work correctly. + +By submitting a contribution, you agree that it may be licensed under the repository's [Apache License 2.0](LICENSE). diff --git a/README.en.md b/README.en.md index ea6cd4f..2b50fab 100644 --- a/README.en.md +++ b/README.en.md @@ -399,6 +399,14 @@ README.en.md English - [Real-project routing samples](tests/real-project-benchmark.md) - [v0.4.0 implementation report](SOL_CONTROL_IMPLEMENTATION_REPORT.md) +## Maintainer and support + +Primary maintainer: [@yehyakin](https://github.com/yehyakin). The project supports the latest tagged release and current `main`; see [SUPPORT.md](SUPPORT.md) for environment boundaries and help channels. Read [CONTRIBUTING.md](CONTRIBUTING.md) and [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) before contributing, and use the structured [issue templates](https://github.com/yehyakin/codex-sol-control/issues/new/choose) for reproducible repository defects. + +## Security + +Do not open a public issue for security-sensitive behavior or attach tokens, private paths, or private repository content. Read [SECURITY.md](SECURITY.md) and submit a [private vulnerability report](https://github.com/yehyakin/codex-sol-control/security/advisories/new). + ## Development and testing Python 3.11 or newer is required. diff --git a/README.md b/README.md index aa8e764..38f47c0 100644 --- a/README.md +++ b/README.md @@ -399,6 +399,14 @@ README.en.md English - [真实项目路由样本](tests/real-project-benchmark.md) - [v0.4.0 实施报告](SOL_CONTROL_IMPLEMENTATION_REPORT.md) +## 维护与支持 + +主要维护者:[@yehyakin](https://github.com/yehyakin)。项目支持最新发布版本与当前 `main`;具体环境边界和求助渠道见 [SUPPORT.md](SUPPORT.md)。提交改进前请阅读 [CONTRIBUTING.md](CONTRIBUTING.md) 和 [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md),可复现问题请使用仓库的结构化 [Issue 模板](https://github.com/yehyakin/codex-sol-control/issues/new/choose)。 + +## 安全 + +安全问题不要提交公开 Issue,也不要附带 Token、私有路径或私有仓库内容。请阅读 [SECURITY.md](SECURITY.md),并通过 GitHub [私密漏洞报告](https://github.com/yehyakin/codex-sol-control/security/advisories/new)提交。 + ## 开发与测试 需要 Python 3.11 或更高版本。 diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..e9f2d40 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,33 @@ +# Security Policy + +## Supported versions + +Security fixes target the latest tagged release and the current `main` branch. + +| Version | Supported | +| --- | --- | +| `0.4.x` | Yes | +| `< 0.4` | No | + +## Reporting a vulnerability + +Report suspected vulnerabilities through GitHub's [private vulnerability reporting](https://github.com/yehyakin/codex-sol-control/security/advisories/new). Do not open a public issue and do not include credentials, tokens, private paths, or private repository content. + +Include the affected version or commit, operating system and Codex surface, reproduction steps, impact, and a minimally redacted proof of concept when safe. We aim to acknowledge a report within seven days and will share the next update after triage. + +## Security scope + +Reports are in scope when they concern: + +- installer, uninstaller, validation, backup, checksum, path, or rollback behavior; +- unexpected writes, scope violations, permission escalation, or unsafe agent routing; +- exposure of secrets or private repository data caused by this repository; +- bypasses of the documented review, evidence, or fail-closed boundaries. + +The following belong elsewhere: + +- vulnerabilities in OpenAI, Codex, GitHub, an operating system, or another third-party service; +- model availability, model quality, latency, pricing, or cost-estimate disagreements; +- bugs in downstream business projects that do not originate in this repository. + +Please report third-party product vulnerabilities to the affected vendor. diff --git a/SUPPORT.md b/SUPPORT.md new file mode 100644 index 0000000..b4025d1 --- /dev/null +++ b/SUPPORT.md @@ -0,0 +1,15 @@ +# Support + +Codex Sol Control is maintained for the latest tagged release and the current `main` branch. The supported installation surfaces are macOS and Linux through the POSIX lifecycle scripts, plus Windows through Windows PowerShell 5.1 and PowerShell 7. + +Exact custom-agent selection, models, reasoning effort, permissions, and nested delegation depend on the Codex host. The repository documents only runtime surfaces for which evidence has been recorded; GitHub-hosted Windows validation is not proof of every physical Windows or Codex Desktop configuration. + +## Where to ask + +- Reproducible repository defect: use the [bug report form](https://github.com/yehyakin/codex-sol-control/issues/new?template=bug_report.yml). +- Focused improvement proposal: use the [feature request form](https://github.com/yehyakin/codex-sol-control/issues/new?template=feature_request.yml). +- Security-sensitive behavior: follow the [security policy](SECURITY.md) and report it privately. +- Contribution workflow: read [CONTRIBUTING.md](CONTRIBUTING.md). +- OpenAI account, billing, product availability, or Codex service issue: use official OpenAI support. + +Support does not include debugging unrelated downstream business repositories. Never attach secrets, unredacted configuration, private source code, or private filesystem paths to a public issue. diff --git a/scripts/validate.ps1 b/scripts/validate.ps1 index 17e5941..76318f1 100644 --- a/scripts/validate.ps1 +++ b/scripts/validate.ps1 @@ -302,6 +302,14 @@ $requiredFiles = @( "scripts/uninstall.ps1", "README.md", "README.en.md", + "CONTRIBUTING.md", + "CODE_OF_CONDUCT.md", + "SECURITY.md", + "SUPPORT.md", + ".github/ISSUE_TEMPLATE/bug_report.yml", + ".github/ISSUE_TEMPLATE/feature_request.yml", + ".github/ISSUE_TEMPLATE/config.yml", + ".github/pull_request_template.md", "docs/assets/readme/hero-zh.svg", "docs/assets/readme/hero-en.svg", "docs/assets/readme/control-plane-zh.svg", @@ -318,6 +326,29 @@ foreach ($relative in $requiredFiles) { Assert-File (Join-Path $repoRoot $relative) } +$contributingText = Read-Utf8Text (Join-Path $repoRoot "CONTRIBUTING.md") +Assert-Regex $contributingText 'bash scripts/test\.sh' "CONTRIBUTING.md is missing the test command" +Assert-Regex $contributingText 'Apache License 2\.0' "CONTRIBUTING.md is missing the contribution license" + +$codeOfConductText = Read-Utf8Text (Join-Path $repoRoot "CODE_OF_CONDUCT.md") +Assert-Regex $codeOfConductText 'Contributor Covenant' "CODE_OF_CONDUCT.md is missing its upstream attribution" + +$securityText = Read-Utf8Text (Join-Path $repoRoot "SECURITY.md") +Assert-Regex $securityText '/security/advisories/new' "SECURITY.md is missing private vulnerability reporting" +Assert-Regex $securityText 'Do not open a public issue' "SECURITY.md is missing its public disclosure warning" + +$readmeText = Read-Utf8Text (Join-Path $repoRoot "README.md") +$englishReadmeText = Read-Utf8Text (Join-Path $repoRoot "README.en.md") +Assert-Regex $readmeText 'SUPPORT\.md' "README.md is missing the support entry" +Assert-Regex $englishReadmeText 'SUPPORT\.md' "README.en.md is missing the support entry" + +$issueConfigText = Read-Utf8Text (Join-Path $repoRoot ".github/ISSUE_TEMPLATE/config.yml") +Assert-Regex $issueConfigText '(?m)^blank_issues_enabled:\s*false\s*$' "issue template config permits blank issues" +Assert-Regex $issueConfigText 'Security vulnerability' "issue template config is missing private security routing" + +$pullRequestTemplateText = Read-Utf8Text (Join-Path $repoRoot ".github/pull_request_template.md") +Assert-Regex $pullRequestTemplateText 'Validation and evidence' "pull request template is missing evidence guidance" + $skillRoot = Join-Path $repoRoot ".agents/skills/sol-control" Assert-PlainTree $skillRoot $skillText = Read-Utf8Text (Join-Path $skillRoot "SKILL.md") diff --git a/scripts/validate.sh b/scripts/validate.sh index eee847c..eb03ddc 100755 --- a/scripts/validate.sh +++ b/scripts/validate.sh @@ -20,6 +20,9 @@ WINDOWS_LIFECYCLE_FILE="$ROOT_DIR/tests/windows-lifecycle.ps1" WINDOWS_WORKFLOW_FILE="$ROOT_DIR/.github/workflows/windows-validation.yml" TEST_ENTRYPOINT_FILE="$SCRIPT_DIR/test.sh" POSIX_WORKFLOW_FILE="$ROOT_DIR/.github/workflows/posix-validation.yml" +BUG_TEMPLATE_FILE="$ROOT_DIR/.github/ISSUE_TEMPLATE/bug_report.yml" +FEATURE_TEMPLATE_FILE="$ROOT_DIR/.github/ISSUE_TEMPLATE/feature_request.yml" +ISSUE_CONFIG_FILE="$ROOT_DIR/.github/ISSUE_TEMPLATE/config.yml" failures=0 fail() { @@ -45,6 +48,14 @@ required_files=( "scripts/uninstall.ps1" "README.md" "README.en.md" + "CONTRIBUTING.md" + "CODE_OF_CONDUCT.md" + "SECURITY.md" + "SUPPORT.md" + ".github/ISSUE_TEMPLATE/bug_report.yml" + ".github/ISSUE_TEMPLATE/feature_request.yml" + ".github/ISSUE_TEMPLATE/config.yml" + ".github/pull_request_template.md" "docs/assets/readme/hero-zh.svg" "docs/assets/readme/hero-en.svg" "docs/assets/readme/control-plane-zh.svg" @@ -59,6 +70,17 @@ required_files=( for relative in "${required_files[@]}"; do [[ -f "$ROOT_DIR/$relative" ]] || fail "missing required file: $relative" done + +grep -Fq 'bash scripts/test.sh' "$ROOT_DIR/CONTRIBUTING.md" || fail 'CONTRIBUTING.md is missing the test command' +grep -Fq 'Apache License 2.0' "$ROOT_DIR/CONTRIBUTING.md" || fail 'CONTRIBUTING.md is missing the contribution license' +grep -Fq 'Contributor Covenant' "$ROOT_DIR/CODE_OF_CONDUCT.md" || fail 'CODE_OF_CONDUCT.md is missing its upstream attribution' +grep -Fq '/security/advisories/new' "$ROOT_DIR/SECURITY.md" || fail 'SECURITY.md is missing private vulnerability reporting' +grep -Fq 'Do not open a public issue' "$ROOT_DIR/SECURITY.md" || fail 'SECURITY.md is missing its public disclosure warning' +grep -Fq 'SUPPORT.md' "$ROOT_DIR/README.md" || fail 'README.md is missing the support entry' +grep -Fq 'SUPPORT.md' "$ROOT_DIR/README.en.md" || fail 'README.en.md is missing the support entry' +grep -Fq 'blank_issues_enabled: false' "$ISSUE_CONFIG_FILE" || fail 'issue template config permits blank issues' +grep -Fq 'Security vulnerability' "$ISSUE_CONFIG_FILE" || fail 'issue template config is missing private security routing' +grep -Fq 'Validation and evidence' "$ROOT_DIR/.github/pull_request_template.md" || fail 'pull request template is missing evidence guidance' [[ -d "$SKILL_ROOT" ]] || fail 'missing canonical v0.4 skill directory' [[ -d "$COMPAT_SKILL_ROOT" ]] || fail 'missing v0.4 compatibility skill directory' @@ -488,11 +510,14 @@ PY fi if command -v ruby >/dev/null 2>&1; then - if ! ruby -r yaml - "$SKILL_FILE" "$OPENAI_FILE" "$COMPAT_SKILL_FILE" "$COMPAT_OPENAI_FILE" <<'RUBY' >/dev/null 2>&1 + if ! ruby -r yaml - "$SKILL_FILE" "$OPENAI_FILE" "$COMPAT_SKILL_FILE" "$COMPAT_OPENAI_FILE" "$BUG_TEMPLATE_FILE" "$FEATURE_TEMPLATE_FILE" "$ISSUE_CONFIG_FILE" <<'RUBY' >/dev/null 2>&1 skill_path = ARGV[0] openai_path = ARGV[1] compat_skill_path = ARGV[2] compat_openai_path = ARGV[3] +bug_template_path = ARGV[4] +feature_template_path = ARGV[5] +issue_config_path = ARGV[6] def load_yaml(text) YAML.safe_load(text, permitted_classes: [], permitted_symbols: [], aliases: false) @@ -530,6 +555,19 @@ compat_openai = load_yaml(File.read(compat_openai_path, encoding: "UTF-8")) raise unless compat_openai.dig("policy", "allow_implicit_invocation") == false compat_prompt = compat_openai.dig("interface", "default_prompt") raise unless compat_prompt.is_a?(String) && compat_prompt.include?("$sol-luna") && compat_prompt.include?("$sol-control") + +[bug_template_path, feature_template_path].each do |path| + form = load_yaml(File.read(path, encoding: "UTF-8")) + raise unless form.is_a?(Hash) + raise unless form["name"].is_a?(String) && !form["name"].strip.empty? + raise unless form["description"].is_a?(String) && !form["description"].strip.empty? + raise unless form["body"].is_a?(Array) && !form["body"].empty? +end + +issue_config = load_yaml(File.read(issue_config_path, encoding: "UTF-8")) +raise unless issue_config.is_a?(Hash) +raise unless issue_config["blank_issues_enabled"] == false +raise unless issue_config["contact_links"].is_a?(Array) && !issue_config["contact_links"].empty? RUBY then fail 'YAML parsing or interface validation failed' diff --git a/tests/test_readme.py b/tests/test_readme.py index 0af3ee9..6d64cf0 100644 --- a/tests/test_readme.py +++ b/tests/test_readme.py @@ -602,6 +602,9 @@ def test_readmes_cover_layout_testing_limitations_prior_art_and_license(self) -> r"(?i)limitations?|限制", r"(?i)prior\s+art|先例", r"(?i)license|许可证|许可", + r"(?i)maintainer|维护者", + r"(?i)support|支持", + r"(?i)security|安全", ) for path, text in documents.items(): for topic in required_topics: @@ -805,6 +808,11 @@ def test_bilingual_core_signals_have_parity(self) -> None: "Native Nested", "SOL_CONTROL_IMPLEMENTATION_REPORT.md", "v0.5.0", + "CONTRIBUTING.md", + "CODE_OF_CONDUCT.md", + "SECURITY.md", + "SUPPORT.md", + "@yehyakin", ) for signal in parity_signals: for path, text in documents.items(): diff --git a/tests/test_release_engineering.py b/tests/test_release_engineering.py index f605ed0..4e56ce5 100644 --- a/tests/test_release_engineering.py +++ b/tests/test_release_engineering.py @@ -117,6 +117,16 @@ def test_test_entrypoint_and_validation_scripts_cover_new_contract_files(self) - self.assertIn("scripts/test.sh", text) self.assertIn("posix-validation.yml", text) self.assertIn("windows-validation.yml", text) + for community_file in ( + "CONTRIBUTING.md", + "CODE_OF_CONDUCT.md", + "SECURITY.md", + "SUPPORT.md", + "bug_report.yml", + "feature_request.yml", + "pull_request_template.md", + ): + self.assertIn(community_file, text) def test_python_entrypoints_cover_named_311_through_314_candidates(self) -> None: for relative in (Path("scripts/test.sh"), Path("scripts/validate.sh")):