{"id":24347891,"url":"https://github.com/panoplyio/pg-stories","last_synced_at":"2026-05-18T06:04:54.458Z","repository":{"id":145024158,"uuid":"190001894","full_name":"panoplyio/pg-stories","owner":"panoplyio","description":"package for testing postgres 3.0 protocol backend implementations","archived":false,"fork":false,"pushed_at":"2019-07-02T10:59:38.000Z","size":40,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-09-07T06:37:00.276Z","etag":null,"topics":["postgres","postgresql","protocol","testing"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/panoplyio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-03T12:34:40.000Z","updated_at":"2019-07-02T10:03:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"11cd8345-7c41-4755-aa43-fd65f9ca0d5e","html_url":"https://github.com/panoplyio/pg-stories","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/panoplyio/pg-stories","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panoplyio%2Fpg-stories","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panoplyio%2Fpg-stories/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panoplyio%2Fpg-stories/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panoplyio%2Fpg-stories/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/panoplyio","download_url":"https://codeload.github.com/panoplyio/pg-stories/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panoplyio%2Fpg-stories/sbom","scorecard":{"id":719316,"data":{"date":"2025-08-11","repo":{"name":"github.com/panoplyio/pg-stories","commit":"972d870a6ec8aca6115c59ad5b71b7d22894f489"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/27 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-22T10:48:04.878Z","repository_id":145024158,"created_at":"2025-08-22T10:48:04.878Z","updated_at":"2025-08-22T10:48:04.878Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274005336,"owners_count":25205934,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["postgres","postgresql","protocol","testing"],"created_at":"2025-01-18T11:36:53.711Z","updated_at":"2026-05-18T06:04:49.424Z","avatar_url":"https://github.com/panoplyio.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pg-stories\n\nThe purpose of this package is to create readable scenarios that will run against backend implementation of the postgres protocol version 3.0.\nIt is heavily dependent on the great [jackc/pgx](https://github.com/jackc/pgx) package.\n\n### Main Concepts\n\n#### `Step`\nA `Step` can be one of:\n - `*Command`  \n Consists of `FrontendMessage` and will cause the test to send this message to backend.  \n**Example**:\n   ```go\n   \u0026Command{\u0026pgproto3.Query{String: \"SELECT 1;\"}}\n   ```\n - `*Response`  \n Consists of `BackendMessage` and will cause the test to wait for message from backend \n and compare between the provided and received messages.  \n**Example**:\n   ```go\n   \u0026Response{\u0026pgproto3.ReadyForQuery{}}\n   ```\n\n\n#### `*Story`\nStory contains a sequence of `Step` and requires a `Frontend` to run the steps upon.  \nEach step will be either sent to backend or be compared to received message from backend, \naccording to it's type.\n##### Example\n```go\nfunc TestExample(t *testing.T) {\n    story := \u0026Story{\n        Steps: []Step{\n            \u0026Command{\u0026pgproto3.Query{String: \"SELECT 1;\"}},\n            \u0026Response{\u0026pgproto3.RowDescription{}},\n            \u0026Response{\u0026pgproto3.DataRow{}},\n            \u0026Response{\u0026pgproto3.CommandComplete{}},\n            \u0026Response{\u0026pgproto3.ReadyForQuery{}},\n        },\n        Frontend: f,\n    }\n    sigKill := make(chan interface{})\n    timer := time.NewTimer(time.Second * 2)\n    go func() {\n        \u003c-timer.C\n        sigKill \u003c- fmt.Errorf(\"timeout\")\n    }()\n    err = story.Run(t, sigKill)\n    if err != nil {\n    \ttimer.Stop()\n        t.Fatal(err)\n    }\n}\n```\n\n### Story Transcript (WIP)\nYou can also define stories using simple text files. Currently all backend and frontend messages\nthat don't require parameters are working and some are supporting parameters.\n##### Notes  \n- Each line of the file can contain only one step, start order or end order\n#### DSL\n##### Story\n- `=== $1`  \n   Signals start of story.  \n   **Params**\n   1. The name / description of the story. Will be returned from the parser.\n- `===`  \n   Signals end of story.\n##### Step\nEach line that define a step **must** start with either `-\u003e` for command (frontend message) \nor `\u003c-` for response (backend message)  \nResponses not yet accepting values so you can define them as expected response \nand they will be evaluated without checking returned values.\n  \n__Commands__:\n- `-\u003e Q \"$1\"` - (Query)  \n   **Params**  \n   1. Query string.  \n   **Example**  \n   `Q \"SELECT 1;\"`\n- `-\u003e P \"$1\" \"$2\" [$3]` - (Parse)    \n   **Params**  \n   1. Destination prepared statement name. Empty string defines unnamed statement.\n   2. Query string.\n   3. Comma separated parameter OIDs  \n   **Example**  \n   `-\u003e P \"stmt1\" \"SELECT * FROM (VALUES($1),($2)) t;\" [0,2]`\n- `-\u003e B \"$1\" \"$2\" [$3]` - (Bind)  \n  **Params**\n  1. Destination portal name. Empty string defines unnamed portal.\n  2. Source prepared statement. Empty string targets unnamed statement.\n  3. Comma separated parameter values  \n  **Example**  \n  `-\u003e B \"portal1\" \"stmt1\" [1,foo]`\n- `-\u003e D $1 \"$2\"` - (Describe)  \n    **Params**\n    1. Object type. Can be either `S` for statement or `P` for portal.\n    2. Name of the Object  \n    **Example**\n    `-\u003e D S \"stmt1\"`  \n - `-\u003e E \"$1\" $2` - (Execute)  \n    **Params**  \n    1. Portal name. Empty string targets unnamed portal.\n    2. Max rows. 0 for unlimited.\n - `-\u003e S` - (Sync)\n - `-\u003e H` - (Flush)\n \n __Responses__:  \n - `\u003c- 1` - (ParseComplete)\n - `\u003c- 2` - (BindComplete)\n - `\u003c- C` - (CommandComplete)\n - `\u003c- T` - (RowDescription)\n - `\u003c- t` - (ParameterDescription)\n - `\u003c- D` - (DataRow)\n - `\u003c- E` - (ErrorResponse)\n - `\u003c- Z` - (ReadyForQuery)\n \n __Full Example__:\n ```\n === execute named portal\n-\u003e P \"stmt_name\" \"SELECT * FROM (VALUES($1))\" [0]\n-\u003e B \"portal_name\" \"stmt_name\" [foo]\n-\u003e E \"portal_name\" 0\n-\u003e S\n\u003c- 1\n\u003c- 2\n\u003c- D\n\u003c- C\n\u003c- Z\n===\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpanoplyio%2Fpg-stories","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpanoplyio%2Fpg-stories","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpanoplyio%2Fpg-stories/lists"}