-
Notifications
You must be signed in to change notification settings - Fork 1
feat: Requirement edits lack optimistic-concurrency protection #101
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
45 commits
Select commit
Hold shift + click to select a range
967a3aa
fix: update scrutiny areas for draft edit concurrency and renumber se…
johlju 893635c
feat: add expectedEditedAt handling and stale edit conflict notificat…
johlju c23903b
fix: reject stale draft edits to maintain content integrity
johlju 7c1fc82
feat: add expectedEditedAt handling and stale edit conflict managemen…
johlju e6f2ced
fix: enhance optimistic concurrency handling for edited_at updates in…
johlju 0c427c3
fix: clarify draft editing requirements and stale draft rejection in …
johlju 0f494cf
fix: document requirement.expectedEditedAt usage and stale token hand…
johlju 1317e86
fix: clarify requirement management edit process and handle stale edi…
johlju 666436c
feat: add revision_token to requirement_versions for optimistic concu…
johlju 5aa30f7
fix: add MCP Tool Contract upkeep instructions for callable behavior …
johlju ab43b38
fix: replace expectedEditedAt with baseRevisionToken and baseVersionI…
johlju 5d0afc3
fix: update draft edit concurrency scenario to include baseVersionId …
johlju 26d8764
fix: replace expectedEditedAt with baseRevisionToken and baseVersionI…
johlju 67c52ad
fix: replace expectedEditedAt with baseRevisionToken and baseVersionI…
johlju 867448b
fix: update requirement editing logic to use baseVersionId and baseRe…
johlju c6efaf4
fix: refactor UP_STATEMENTS for clarity and structure in requirement_…
johlju aa73057
fix: update documentation to reflect changes in concurrency handling …
johlju 9c837a2
fix: enhance requirement form with refresh handling and loading state
johlju 6b36271
fix: update editRequirement logic to use review and archived version …
johlju 077b6e9
fix: enhance requirement tests to handle stale edit conflicts and err…
johlju a1cbaf3
fix: comment out SQL Server env file preparation step in integration …
johlju efcb020
fix: uncomment SQL Server env file preparation step in integration tests
johlju c324df2
debug CI
johlju 6f69e78
fix: comment out sensitive environment variable setup in SQL Server p…
johlju 4546d44
debug ci
johlju 986fe5c
fix: re-add MSSQL_SA_PASSWORD for integration tests in CI
johlju 7b1c945
fix: add readonly database user credentials for integration tests
johlju e295fa5
fix: remove sensitive environment variables from SQL Server setup in …
johlju cda25d5
fix: remove sensitive information from SQL Server environment setup i…
johlju e5c3a56
fix: update SQL Server environment variables for consistency across c…
johlju bf0ceee
fix: update comments in SQL Server CI environment file for clarity
johlju 48177f7
fix: refactor tool retrieval to use getTool function and update revis…
johlju 10196c4
fix: update revision_token constraint to be unique in requirement_ver…
johlju 9c262f8
fix: enhance check script to include dotenv-linter checks and fixes
johlju dd4dba5
fix: update check and fix commands to include dotenv-linter functiona…
johlju 4ac483d
fix: add dotenv:check command to the check script
johlju 60aa7ab
fix: add dotenv-linter installation and check to quality checks workflow
johlju 32b429e
fix: install dotenv-linter for environment file checks in Dockerfile
johlju c33be29
fix: add dotenv-linter information to architecture documentation
johlju a9ac879
fix: update dotenv-linter checks in quality workflow with improved fl…
johlju d50f6b1
fix: enhance dotenv-linter commands with exclusions for improved chec…
johlju 7370771
fix: simplify getTool function by removing cleanup handling and strea…
johlju 1f1b784
fix: remove unnecessary exclusion flag from dotenv-linter devcontaine…
johlju 2dca9c8
fix: refactor tool retrieval logic in MCP tests for improved resource…
johlju 988fedf
fix: streamline dotenv-linter flags and optimize test tool retrieval
johlju 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,25 @@ | ||
| # CI defaults for integration tests (no secrets — safe to commit). | ||
| # MSSQL_SA_PASSWORD must be supplied by the CI runner (GitHub Actions | ||
| # variable / secret) and appended to .env.sqlserver before `npm run db:up`. | ||
| # Read-only browse credentials are intentionally omitted; CI only needs | ||
| # the SA login to provision the database and run integration tests. | ||
| # CI defaults for integration tests and browse workflows (safe to commit). | ||
| # MSSQL_SA_PASSWORD is a well-known SQL Server example password intentionally | ||
| # committed because forked PRs cannot access GitHub Actions secrets or vars. | ||
| # The read-only credentials block is also committed for integration tests and | ||
| # read-only developer browse use. | ||
|
|
||
| ACCEPT_EULA=Y | ||
| MSSQL_PID=Developer | ||
| SQLSERVER_HOST_PORT=1433 | ||
|
|
||
| # This password is a well-known password (used in examples) to build the test | ||
| # database and run integration tests in CI. It is intentionally set here and not | ||
| # a secret or variable in GitHub Actions because the integration tests need to | ||
| # run on pull requests from forks, where secrets and variables are not available. | ||
| MSSQL_SA_PASSWORD=YourStrong!Passw0rd | ||
|
|
||
| DB_ENCRYPT=true | ||
| DB_HOST=127.0.0.1 | ||
| DB_PORT=1433 | ||
| DB_NAME=kravhantering | ||
| DB_ENCRYPT=true | ||
| DB_PORT=1433 | ||
| DB_TRUST_SERVER_CERTIFICATE=true | ||
|
|
||
| DATABASE_READONLY_PASSWORD_ENV=DB_READONLY_PASSWORD | ||
| DB_READONLY_PASSWORD=BrowseOnly!Passw0rd7 | ||
| DB_READONLY_USER=readonly |
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,20 @@ | ||
| --- | ||
| applyTo: "{lib/mcp/**/*.ts,lib/requirements/**/*.ts,lib/dal/**/*.ts,app/api/**/*.ts,docs/mcp-server-*.md,tests/unit/mcp-http.test.ts}" | ||
| --- | ||
|
|
||
| # MCP Tool Contract Upkeep | ||
|
|
||
| ## When Changing Callable Behavior | ||
|
|
||
| - If logic changes what an MCP client must send, can receive, or should do | ||
| next, update `lib/mcp/server.ts` in the same change. | ||
| - Keep tool `description`, `inputSchema`, `outputSchema`, and field | ||
| `.describe(...)` text aligned with the handler/service behavior. | ||
| - State prerequisite tool calls and exact source/destination fields for values | ||
| clients must echo, such as `requirements_get_requirement` | ||
| `requirement.versions[0].id` to `requirement.baseVersionId`. | ||
| - Do not rely on user docs alone to teach MCP clients how to call a tool. | ||
| - Update `docs/mcp-server-user-guide.md`, | ||
| `docs/mcp-server-contributor-guide.md`, and `tests/unit/mcp-http.test.ts`. | ||
| - For outward-facing MCP invariants, update the quality siblings described in | ||
| `.github/instructions/quality-spec.instructions.md`. |
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
Oops, something went wrong.
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.