feat: Openspec guidelines#91
Open
satlead wants to merge 29 commits into
Open
Conversation
Contributor
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces WebSocket handshake header support (injecting custom request headers and exposing response headers) in the Firebolt C++ transport stack, and adds OpenSpec/Slidev artifacts to document and operationalize spec-driven workflows for this repo.
Changes:
- Add support for injecting custom HTTP headers during
Transport::connect()and retrieving server response headers viagetResponseHeader(). - Extend
IGatewayto exposegetResponseHeader()and update unit/integration tests + README accordingly. - Add OpenSpec specs, coverage tooling, prompts/skills, and Slidev presentations/templates for documenting and sharing the workflow.
Reviewed changes
Copilot reviewed 42 out of 45 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| test/unit/transportTest.cpp | Adds an integration test covering response header retrieval (and attempts to cover header injection). |
| test/unit/helperTest.cpp | Updates MockGateway for the new IGateway::getResponseHeader API. |
| src/transport.h | Extends Transport::connect() signature to accept headers; adds response header storage + accessor. |
| src/transport.cpp | Injects headers into websocketpp connection; captures response headers on open; implements getResponseHeader(). |
| src/gateway.cpp | Forwards Config.headers into Transport::connect() and exposes IGateway::getResponseHeader(). |
| include/firebolt/gateway.h | Adds IGateway::getResponseHeader() to the public interface. |
| include/firebolt/config.h.in | Adds Config.headers for custom handshake headers. |
| README.md | Documents header injection and response header retrieval usage. |
| openspec/config.yaml | Defines OpenSpec project config and spec/template rules. |
| openspec/specs/transport_layer_spec.md | Adds canonical transport layer spec (including headers requirement). |
| openspec/specs/header_interfaces_spec.md | Adds canonical header-interfaces spec. |
| openspec/specs/json_rpc_handling_spec.md | Adds canonical JSON-RPC handling spec. |
| openspec/specs/cpp_specifics_spec.md | Adds canonical C++ implementation specifics spec. |
| openspec/specs/transport_recommendations_spec.md | Adds canonical recommendations spec. |
| openspec/changes/archive/2026-03-16-add-header-support/add_header_support_proposal.md | Archives the header-support proposal artifact. |
| openspec/changes/archive/2026-03-16-add-header-support/design.md | Archives the header-support design artifact. |
| openspec/changes/archive/2026-03-16-add-header-support/tasks.md | Archives the header-support task checklist. |
| openspec/changes/archive/2026-03-16-add-header-support/specs/header_support_spec.md | Archives the header-support spec (currently not template-compliant). |
| .github/skills/openspec-templater/spec_template.md | Introduces a standard spec template. |
| .github/skills/openspec-templater/SKILL.md | Adds an OpenSpec skill to template/normalize specs. |
| .github/skills/openspec-coverage/SKILL.md | Adds an OpenSpec coverage skill doc. |
| .github/skills/openspec-coverage/openspec_coverage.py | Adds a script to compute code-to-spec coverage and emit a report. |
| .github/skills/openspec-propose/SKILL.md | Adds an OpenSpec propose workflow skill doc. |
| .github/skills/openspec-explore/SKILL.md | Adds an OpenSpec explore workflow skill doc. |
| .github/skills/openspec-apply-change/SKILL.md | Adds an OpenSpec apply workflow skill doc. |
| .github/skills/openspec-archive-change/SKILL.md | Adds an OpenSpec archive workflow skill doc. |
| .github/prompts/opsx-propose.prompt.md | Adds prompt for propose flow. |
| .github/prompts/opsx-explore.prompt.md | Adds prompt for explore flow. |
| .github/prompts/opsx-apply.prompt.md | Adds prompt for apply flow. |
| .github/prompts/opsx-archive.prompt.md | Adds prompt for archive flow. |
| spec_coverage.md | Adds a generated OpenSpec coverage report snapshot. |
| .gitignore | Ignores pnpm lockfiles in subdirs. |
| presentations/transport-slides/slides.md | Adds a Slidev deck for transport; currently contains malformed frontmatter mid-file. |
| presentations/transport-slides/package.json | Adds Slidev project config for transport slides. |
| presentations/openspec-with-copliot-experience/slides.md | Adds a Slidev deck describing OpenSpec + Copilot experience. |
| presentations/openspec-with-copliot-experience/package.json | Adds Slidev project config for that deck. |
| project_template/slides.md | Adds a template Slidev deck starter. |
| project_template/package.json | Adds a template Slidev package manifest. |
| package.json | Adds a root Node devDependency (playwright-chromium). |
| .github/release/package-lock.json | Adjusts the package-lock name used under release tooling. |
Files not reviewed (1)
- .github/release/package-lock.json: Language not supported
Comment on lines
+381
to
+390
| std::optional<std::string> Transport::getResponseHeader(const std::string& headerName) | ||
| { | ||
| std::lock_guard<std::mutex> lock(responseHeadersMutex_); | ||
| auto it = responseHeaders_.find(headerName); | ||
| if (it != responseHeaders_.end()) | ||
| { | ||
| return it->second; | ||
| } | ||
| return std::nullopt; | ||
| } |
Comment on lines
+303
to
+305
| auto customHeader = transport.getResponseHeader("X-Test-Header"); | ||
| // Custom header may not be echoed by server, but should not crash | ||
| EXPECT_TRUE(customHeader == std::nullopt || customHeader.has_value()); |
Comment on lines
+286
to
+291
| // Custom header to inject | ||
| std::map<std::string, std::string> customHeaders = {{"X-Test-Header", "HeaderValue"}}; | ||
|
|
||
| Firebolt::Error err = | ||
| transport.connect(m_uri, onMessage, onConnectionChange, std::nullopt, std::nullopt, customHeaders); | ||
| ASSERT_EQ(err, Firebolt::Error::None); |
Comment on lines
50
to
54
| Firebolt::Error connect(std::string url, MessageCallback onMessage, ConnectionCallback onConnectionChange, | ||
| std::optional<unsigned> transportLoggingInclude = std::nullopt, | ||
| std::optional<unsigned> transportLoggingExclude = std::nullopt); | ||
| std::optional<unsigned> transportLoggingExclude = std::nullopt, | ||
| const std::map<std::string, std::string>& headers = {}); | ||
| Firebolt::Error disconnect(); |
Comment on lines
+3
to
+5
| ## Capability | ||
| Add support for custom HTTP headers in the Firebolt C++ transport layer, including both header injection during connection and response header retrieval after connection. | ||
|
|
Comment on lines
+168
to
+175
| theme: default | ||
| title: Firebolt C++ Transport | ||
| info: | | ||
| Slide deck for the Firebolt C++ Transport project | ||
| highlighter: shiki | ||
| transition: slide-left | ||
| mdc: true | ||
| --- |
Comment on lines
+11
to
+12
| "@slidev/cli": "latest", | ||
| "@slidev/theme-default": "^0.25.0" |
Contributor
|
b'## WARNING: A Blackduck scan failure has been waived A prior failure has been upvoted
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.