-
Notifications
You must be signed in to change notification settings - Fork 0
feat(clearfolio): expose queryable capability readiness to planners #537
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
Open
cursor
wants to merge
8
commits into
feat/clearfolio-capability-readiness-489
Choose a base branch
from
cursor/bc-7295b3cf-ffc9-426a-b244-d93d50dc6d53-190f
base: feat/clearfolio-capability-readiness-489
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
f1285c6
feat(clearfolio): expose queryable capability readiness to planners
cursoragent a460724
merge(clearfolio): reconcile operator readiness onto current capabili…
seonghobae 707ffd5
chore(clearfolio): reconcile operator surface to current readiness pa…
seonghobae 396977e
chore(stack): reconcile Clearfolio operator surface
seonghobae 7a2ece4
test(clearfolio): surface unknown readiness to planners
seonghobae 7103367
test(clearfolio): preserve advisory fail-open contract
seonghobae 96af8ab
test(clearfolio): require unready view capability response
seonghobae abcd68c
fix(clearfolio): prioritize unready view remediation
seonghobae 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
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,67 @@ | ||
| # Clearfolio capability operator and planner surface | ||
|
|
||
| ## Decision | ||
|
|
||
| Startup logs are not a buyer-usable control surface. A planner who opens 산출물 | ||
| must learn that document conversion is unavailable before selecting a file, and | ||
| an operator who cannot read container stdout must still retrieve the same | ||
| non-secret readiness record. | ||
|
|
||
| ScopeWeave therefore exposes authenticated `GET /api/capabilities` and fails | ||
| attachment upload/view with HTTP 503 when Clearfolio is locally unready. Both | ||
| surfaces reuse `clearfolioCapabilityStatus()` and never call the provider. | ||
| `GET /api/health` remains liveness-only. | ||
|
|
||
| This slice does not claim remote Clearfolio reachability. It completes the | ||
| operator/planner half of issue #489 configuration readiness. | ||
|
|
||
| ## Planner next action | ||
|
|
||
| The attachments dialog reads `/api/capabilities` after login. When | ||
| `ready=false`, it shows the server `action` as a status notice, disables the | ||
| file input, and changes the submit label to `변환 설정 필요`. If the advisory | ||
| query fails, the dialog stays open and the server remains authoritative: an | ||
| unconfigured upload still returns 503 with the same reason and action. | ||
|
|
||
| ## Why 503 instead of 502 | ||
|
|
||
| RFC 9110 distinguishes a gateway/proxy error (502) from a service that is | ||
| temporarily or locally unable to handle the request (503). An unconfigured or | ||
| unsafe Clearfolio deployment is not a failed downstream hop; it is a local | ||
| capability that the process has already decided it cannot serve. Returning 503 | ||
| with a stable reason prevents operators from paging a remote provider that was | ||
| never contacted. | ||
|
|
||
| ## Security and privacy boundary | ||
|
|
||
| - Anonymous callers receive `401` and learn only that the route is | ||
| authenticated. Deployment mode (`development_mock` vs `unavailable`) is not | ||
| published on unauthenticated surfaces, including `/api/metrics`. | ||
| - The JSON body contains only capability name, readiness, mode, stable reason, | ||
| and fixed remediation text. HMAC material, URLs, tenant claims, job IDs, and | ||
| provider bodies are omitted. | ||
| - The UI helper only formats an already-safe record; it does not invent a | ||
| second readiness evaluator. | ||
|
|
||
| ## Verification contract | ||
|
|
||
| `tests/unit/clearfolio-capability-readiness.test.mjs` continues to launch a | ||
| fresh process per configuration and replaces `fetch` with a throwing function. | ||
| Added cases prove HMAC-invalid readiness, authenticated capability query, and | ||
| 503 upload rejection without provider traffic. | ||
| `tests/unit/cloud-sync-security.test.mjs` locks the planner notice copy. | ||
|
|
||
| ## Rollback | ||
|
|
||
| Remove `GET /api/capabilities`, the 503 attachment short-circuit, and the | ||
| attachments-dialog notice together. Do not restore implicit production mocks or | ||
| make `/api/health` fail. | ||
|
|
||
| ## References | ||
|
|
||
| Fielding, R., Nottingham, M., & Reschke, J. (2022). *HTTP semantics* (RFC 9110; | ||
| STD 97). Internet Engineering Task Force. https://doi.org/10.17487/RFC9110 | ||
|
|
||
| The Kubernetes Authors. (2026). *Liveness, readiness, and startup probes*. | ||
| Kubernetes Documentation. | ||
| https://kubernetes.io/docs/concepts/workloads/pods/probes/ |
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
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.