Repository navigation
docs: separate public plugin onboarding from maintainer procedures #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
fd9f133
docs: separate public plugin onboarding from maintainer procedures
ysinh d1d6399
test: reject mixed-case non-production documentation hosts
ysinh c9c9c39
docs: link the verified public plugin listing
ysinh f85c052
fix: reject localhost on every port in public documentation
ysinh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| import unittest | ||
|
|
||
| from scripts.validate import public_documentation_errors | ||
|
|
||
|
|
||
| class PublicDocumentationTests(unittest.TestCase): | ||
| def test_public_setup_and_synthetic_examples_are_allowed(self): | ||
| for text in ( | ||
| "https://mcp-api.convai.com/mcp", | ||
| "https://login.convai.com", | ||
| "https://github.com/Conv-AI/ConvAI-Agent-Plugin", | ||
| "support@convai.com", | ||
| "OAuth public client ID chatgpt, no client secret", | ||
| "character:read character:write", | ||
| "11111111-1111-4111-8111-111111111111", | ||
| "cvpat_...", | ||
| ): | ||
| with self.subTest(text=text): | ||
| self.assertEqual(public_documentation_errors(text), []) | ||
|
|
||
| def test_nonproduction_hosts_are_rejected(self): | ||
| for host in ( | ||
| "https://fixture-stg.convai.com/mcp", | ||
| "https://fixture-preview.convai.com", | ||
| "https://fixture-dev.convai.com", | ||
| "HTTPS://FIXTURE-STG.CONVAI.COM/mcp", | ||
| "http://localhost/mcp", | ||
| "http://localhost:8080/mcp", | ||
| "http://localhost:8081/mcp", | ||
| "HTTP://LOCALHOST:8080/mcp", | ||
| "http://127.0.0.1:8080/mcp", | ||
| ): | ||
| with self.subTest(host=host): | ||
| self.assertIn( | ||
| "README.md: references a non-production host", | ||
| public_documentation_errors(host), | ||
| ) | ||
|
|
||
| def test_internal_references_are_rejected(self): | ||
| for text in ( | ||
| "https://convaixr.atlassian.net/wiki/example", | ||
| "https://conv-ai.slack.com/archives/example", | ||
| "https://console.cloud.google.com/logs/query", | ||
| "https://admin.internal.convai.com", | ||
| "CORE-1234", | ||
| "prj-cs-test-example", | ||
| ): | ||
| with self.subTest(text=text): | ||
| self.assertIn( | ||
| "README.md: references internal operational information", | ||
| public_documentation_errors(text), | ||
| ) | ||
|
|
||
| def test_credential_material_is_rejected_without_echoing_it(self): | ||
| for text in ( | ||
| "cvpat_" + "0" * 12, | ||
| "cvoat_" + "0" * 12, | ||
| "-----BEGIN PRIVATE KEY-----", | ||
| "AIza" + "0" * 32, | ||
| ): | ||
| with self.subTest(kind=text[:5]): | ||
| result = public_documentation_errors(text) | ||
| self.assertIn("README.md: looks like it contains a credential", result) | ||
| self.assertTrue(all(text not in message for message in result)) | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| unittest.main() |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.