Skip to content

AI Fix for Issue #196: Update readme with UI description - #198

Closed
propr-dev[bot] wants to merge 1 commit into
mainfrom
ai-fix/196-update-readme-with-ui-des-20251101-0052-claude-sonnet-4-5-20250929-eu7
Closed

propr-dev[bot] wants to merge 1 commit into
mainfrom
ai-fix/196-update-readme-with-ui-des-20251101-0052-claude-sonnet-4-5-20250929-eu7

Conversation

@propr-dev

@propr-dev propr-dev Bot commented Nov 1, 2025

Copy link
Copy Markdown
Contributor

AI Implementation Summary

Closes #196

Model Used: claude-sonnet-4-5-20250929
Status: ✅ Implementation Completed
Branch: ai-fix/196-update-readme-with-ui-des-20251101-0052-claude-sonnet-4-5-20250929-eu7
Commits: ✅ Changes committed (bdc3719)


🤖 AI Processing Completed

Execution Details:

  • Issue: #196
  • Repository: integry/gitfix
  • Status: ✅ Success
  • Execution Time: 27s
  • Timestamp: 2025-11-01T00:53:04.891Z
  • LLM Model: claude-sonnet-4-5-20250929

Summary:
Perfect! I've successfully added a "Web Management UI" section to the README with basic information about the UI. The addition includes:

  1. A brief description of what the UI provides
  2. Key features (real-time monitoring, task queue visibility, auto-refresh, responsive design)
  3. How to access it (via Docker Compose on port 5173)
  4. Links to more detailed documentation

The section is placed logically in the README after the configuration examples and before the Docker Compose setup section, since the Docker Compose section already mentions the UI service.

Summary: Added a basic Web Management UI section to README.md describing the React-based interface, its key features (real-time monitoring, task queue stats, auto-refresh, responsive design), access information (localhost:5173 when using Docker Compose), and links to detailed documentation.

Claude Code Results:

  • Turns Used: 16
  • Cost: $0.23
  • Session ID: aef396ff-efe4-4e07-b319-07b10d395b1b

📁 Detailed Logs:
Execution logs generated:

  • Conversation: 16 messages
  • Session: aef396ff-efe4-4e07-b319-07b10d395b1b
  • Raw Output: 48,517 characters

Log files stored at:

  • conversation: /tmp/claude-logs/issue-196-2025-11-01T00-53-04-892Z-conversation.json
  • output: /tmp/claude-logs/issue-196-2025-11-01T00-53-04-892Z-output.txt
💬 Latest Conversation Messages
ASSISTANT: [content unavailable]

ASSISTANT: Perfect! I've successfully added a "Web Management UI" section to the README with basic information about the UI. The addition includes:

1. A brief description of what the UI provides
2. Key features...


Powered by Claude Code v1.0.0


This PR was created automatically by Claude Code after processing issue #196.

Implemented by Claude Code using claude-sonnet-4-5-20250929 model.

Implementation completed successfully.
@propr-dev propr-dev Bot added the gitfix label Nov 1, 2025
@integry integry closed this Nov 1, 2025
@integry
integry deleted the ai-fix/196-update-readme-with-ui-des-20251101-0052-claude-sonnet-4-5-20250929-eu7 branch June 16, 2026 10:53
propr-dev Bot pushed a commit that referenced this pull request Oct 12, 2026
…by replacing the two flagged regexes with plain linear scans. Matching behaviour is the same as before.

I fixed both CodeQL "polynomial regular expression" alerts by replacing the two flagged regexes with plain linear scans. Matching behaviour is the same as before.

- **`packages/core/src/diagnostics/managedLogRuntime.ts`** (alert #198): the `scheme://user[:password]@` pattern got slow on long runs of characters that look like a URL scheme, because it retried from every starting position. A new helper, `urlUserinfo()`, now finds each `://` with `indexOf`, checks that the scheme before it contains a letter, and reads the user and password forward until whitespace, `/`, `@` (or `:` for the user). It still rejects an empty password and still requires a closing `@`. `secretShapedValues()` collects the same values as before: user, password and `user:password`.
- **`packages/core/src/diagnostics/providerRoots.ts`** (alert #199): `.replace(/\/+$/, '')` on the resolved OpenCode config path is now a small `trimTrailingSlashes()` loop. A path with 200,000 slashes now takes about 1 ms.

The three managed-diagnostics test files pass: 31, 7 and 13 tests, 51 in total. That includes the existing checks that a proxy URL's userinfo and a stack-trace URL's credentials get redacted. Typecheck and lint are clean.

To run these tests, start them from the repo root. From `packages/core`, 10 tests fail because they can't find their modules.

There's no visual change, so I made no preview.

PR: #3031
Comment by: @github-advanced-security[bot] (ID: 4252589695)
Comment by: @github-advanced-security[bot] (ID: 4252589711)
Comment by: @propr-dev[bot] (ID: 6133159939)
Model: Claude Opus 5.5
integry pushed a commit that referenced this pull request Oct 12, 2026
…re coverage gaps (#3031)

* I've closed all four gaps from #3023. The 238 tests across the diagnostics, launch, admission, network-egress, config and daemon suites pass, including 7 new ones in `packages/core/test/managedDiagnosticsCoverage.test.ts`. Typecheck and lint are clean on the changed source.

1. Provider credential roots
- I moved the launchers' path resolver (`resolveConfigPath` and the Codex variant) into a new database-free module, `packages/core/src/config/agentConfigPaths.ts`. `configManagerAgents.ts` re-exports it unchanged. Diagnostics can now use the launchers' own path rules without loading SQLite.
- The new `diagnostics/providerRoots.ts` returns either the root or an explicit refusal, using the same rules the launchers mount from:
  - Codex: `CODEX_CONFIG_PATH`, then `HOST_CODEX_DIR`, else `~/.codex`.
  - OpenCode: the data directory, not the config directory.
  - Vibe: `VIBE_CONFIG_PATH`.
  - Managed accounts: default to `~/.propr/agent-credentials`.
- `HOST_*` variables are no longer required when the launch path itself resolves.
- Refusals are recorded on the `capture` source as `credential-root:<reason>`: `unmapped-default-root`, `relative-root`, `no-mounted-auth-store`, `unsupported-provider` or `missing`.

2. Unterminated final line: a final line without a newline is now captured as a record when the stream closes, instead of always becoming a gap. Only an oversized tail is still a gap.

3. Docker errors and stack traces
- Docker CLI/daemon errors and exception heads (`TypeError: …`, `Traceback …`, `panic: …`) are now accepted on stdout/stderr.
- Each head can carry up to 64 follow-on lines, but only stack-frame shapes (JavaScript/Java `at …`, Python `File "…", line N`, Go frames, `Caused by:`). They export as `{"continuation": …}` and get the same redaction.
- A follow-on line containing `{`/`}` or ending in a credential assignment is rejected, and any other line ends the window. Native log files keep the stricter single-line rules.
- Because exported records change shape, I bumped the redaction version to 2.

4. Environment injected by the network/admission policy: native goal launches (Codex app-server, Claude, Antigravity) were scanning the pre-policy arguments plus the admission `docker start` command. That meant environment variables added by the network rewrite were never checked for secrets. `spawnAdmittedAgent` and `spawnWithNetworkPolicy` now hand the callback the post-policy create arguments and launch environment as a second argument. The final and create arguments are still scanned separately. The scan now handles:
- every Docker env form: `--env=K=V`, `-eK=V`, and `-e K` (value taken from the launch environment).
- passwords embedded in URLs, such as proxy or `GIT_CONFIG_VALUE_*` values.
- `Bearer`/`Basic` header values.
- credential-named fields inside JSON values such as MCP configs.

Docs: `docs/operations/managed-diagnostics.md` has a new "Provider stream capture coverage" section. It covers the root table, the refusal reasons and record outcomes, and the capture shapes I intentionally left unsupported:
- Python source lines printed under a traceback frame
- Node `code: '…'` property dumps
- multi-line JSON
- coloured (ANSI) output
- `--env-file` contents
- secrets under innocuous names with no recognisable shape

Things to check in review:
- Native installs whose worker UID differs from the provider root owner still refuse capture. That's the existing ownership check, unchanged here.
- Two existing tests changed slightly:
  - `managedDiagnostics.test.ts` now sets `HOME` to a temp directory, because with the new resolver a real `~/.codex` on the test machine could have made it capture.
  - `networkEgressPolicyCoverage.test.ts` now asserts the callback receives the post-policy create arguments.
- In the end-to-end native fixture test, Codex is given an explicit path, because this sandbox has `/.dockerenv` and so counts as containerized. Codex's default-path resolution is covered by the pure-function tests instead.
- I checked that the post-policy test catches a regression: disabling the URL/header/JSON extraction makes it fail on the proxy canary.

There's no visual change, so no preview.

* feat(ai): Each spool segment now records the redaction version that produced it. Rows from before the upgrade count as v1, and both export and status report the stored version instead of always saying 2. All 51 tests in the three managed-diagnostics test files pass, and typecheck and lint are clean.

Each spool segment now records the redaction version that produced it. Rows from before the upgrade count as v1, and both export and status report the stored version instead of always saying 2. All 51 tests in the three managed-diagnostics test files pass, and typecheck and lint are clean.

**Changes in `packages/core/src/diagnostics/managedLogSpool.ts`:**
- **Schema:** on startup, a `redaction INTEGER NOT NULL DEFAULT 1` column is added to `segments` if it's missing, so existing rows become v1. New segments are inserted with the current `REDACTION_VERSION`.
- **No mixed segments:** `appendRecords()` won't extend the latest segment if its stored version differs from the current one. The new records start a new segment instead, and the usual rotation seals the old v1 segment without touching its contents.
- **Export:** `exportOne()` now sets the manifest's `redactionVersion` from the segment's stored value.
- **Status:** `redactionVersion` still shows the current adapter (2). A new field, `segmentRedactionVersions`, lists the distinct versions held in the spool, so preserved v1 segments are visible there.
- The fail-closed policy migration and the rule that unacknowledged segments are kept are unchanged; the existing policy-upgrade test still passes.

**Restart regression test** (in `packages/core/test/managedDiagnosticsPortability.test.ts`):
- It builds a pre-upgrade spool and then drops the `redaction` column with raw SQLite, so the database looks like the old schema.
- That spool holds one sealed but unacknowledged segment and two open segments (one each on stdout and stderr), all marked v1.
- It reopens the spool, adds a record, restarts, and adds another record on the other source.
- It checks that the three v1 segments export as `redactionVersion: 1` with the same segment ids, digests and gzip bytes as before. The open ones were not extended, and the sealed one matches its earlier pending export.
- The new records land in separate segments exported as `redactionVersion: 2`, and status shows `segmentRedactionVersions: [1, 2]`.
- With the fix temporarily reverted, the test fails.

**Docs (`docs/operations/managed-diagnostics.md`):** the export example now shows `"redactionVersion": 2`. The status description mentions `segmentRedactionVersions`, and a new paragraph explains that `redactionVersion` is recorded per segment and that pre-upgrade segments are kept, never extended, and exported with their original version.

To stay under the 400-line lint limit, I folded the existing `ALTER TABLE` column checks into one loop that now handles both tables. That only changes layout.

There are no visual previews because nothing here is visible in the UI.

PR: #3031
Comment by: @integry (ID: 6132969486)
Model: Claude Opus 5.5

* feat(ai): I fixed both CodeQL "polynomial regular expression" alerts by replacing the two flagged regexes with plain linear scans. Matching behaviour is the same as before.

I fixed both CodeQL "polynomial regular expression" alerts by replacing the two flagged regexes with plain linear scans. Matching behaviour is the same as before.

- **`packages/core/src/diagnostics/managedLogRuntime.ts`** (alert #198): the `scheme://user[:password]@` pattern got slow on long runs of characters that look like a URL scheme, because it retried from every starting position. A new helper, `urlUserinfo()`, now finds each `://` with `indexOf`, checks that the scheme before it contains a letter, and reads the user and password forward until whitespace, `/`, `@` (or `:` for the user). It still rejects an empty password and still requires a closing `@`. `secretShapedValues()` collects the same values as before: user, password and `user:password`.
- **`packages/core/src/diagnostics/providerRoots.ts`** (alert #199): `.replace(/\/+$/, '')` on the resolved OpenCode config path is now a small `trimTrailingSlashes()` loop. A path with 200,000 slashes now takes about 1 ms.

The three managed-diagnostics test files pass: 31, 7 and 13 tests, 51 in total. That includes the existing checks that a proxy URL's userinfo and a stack-trace URL's credentials get redacted. Typecheck and lint are clean.

To run these tests, start them from the repo root. From `packages/core`, 10 tests fail because they can't find their modules.

There's no visual change, so I made no preview.

PR: #3031
Comment by: @github-advanced-security[bot] (ID: 4252589695)
Comment by: @github-advanced-security[bot] (ID: 4252589711)
Comment by: @propr-dev[bot] (ID: 6133159939)
Model: Claude Opus 5.5

* feat(ai): I've made all three changes (S2, S3, S4). The 109 tests in the affected suites pass: diagnostics, daemon, OpenCode agent and network egress. Typecheck is clean for the root and `packages/core`, and lint shows no errors on the changed source. The new S2 and S4 tests fail when run against the previous code, so they do catch the old behaviour.

I've made all three changes (S2, S3, S4). The 109 tests in the affected suites pass: diagnostics, daemon, OpenCode agent and network egress. Typecheck is clean for the root and `packages/core`, and lint shows no errors on the changed source. The new S2 and S4 tests fail when run against the previous code, so they do catch the old behaviour.

**S2: OpenCode refusal now matches the launcher**
- **What I found:** the launcher treats `XDG_DATA_HOME` as a reserved name and never forwards it. So it never skips the data mount: it always mounts the inferred `.local/share/opencode` folder. Diagnostics, by contrast, refused capture whenever that variable was set at all, so every such refusal was unnecessary.
- **Shared rule:** I moved the env-var forwarding rule into a new standalone file, `packages/core/src/agents/impl/openCodeEnvForwarding.ts`. `shouldForwardEnvVar` in `openCodeUtils.ts` now uses it and logs the same warnings as before. `resolveProviderCredentialRoot` now refuses only when that rule would actually forward the variable. Both sides now follow one rule, so they stay in step if the reserved list ever changes.
- **The other two launcher conditions:**
  - The launcher only mounts the inferred folder if it exists. When it doesn't, capture already refuses with `credential-root:missing`.
  - The explicit `dataPath` used by OpenCode analysis is always the same inferred folder, so I didn't need to pass it through.
- **Tests:** one checks the resolver with and without the variable. The other, in `test/opencodeAgent.test.ts`, checks that the launcher's actual mount matches the root diagnostics resolve. I updated the doc's description of the refusal.

**S3: native-file error heads (doc fix only)**
I left the code alone and corrected the doc sentence instead. Native text files recognise the same head lines as stdout/stderr, including Docker errors and exception headers, and export them as single-line `{"message": …}` records with the same redaction. They never carry continuation lines, so stack frames in native files are still dropped and recorded as gaps. I added tests for native exception and Docker-daemon head lines, including redaction of a credential inside them.

**S4: daemon uses the capture-time resolver**
`src/daemon/managedDiagnostics.ts` no longer passes `resolveConfigPath` as an override, so Codex agents go through the Codex-specific resolver, as they do at capture. The new test in `test/daemon.test.ts` uses a containerized install with a Codex agent set to `~/codex-b`, a folder that exists under HOME. That agent is now recorded as `unmapped-native-state` instead of being inventoried at HOME. I also removed the unused `resolveConfigPath` mock from the existing daemon test.

**Found separately (not changed):** OpenCode's `resolveAnalysisDataPath` (`OpenCodeAgent.ts`) has the same "any `XDG_DATA_HOME` set" check. It's harmless because the launcher falls back to the same inferred folder anyway. It isn't part of this PR's changes, so I left it.

There's nothing visual in these changes, so I didn't make previews.

Separately, the Gmail, Google Calendar and Google Drive connectors need authorizing in your claude.ai connector settings before they can be used. Nothing in this task needed them.

PR: #3031
Comment by: @integry (ID: 6133494774)
Model: Claude Opus 5.5

* feat(ai): I've made all three changes (F1, S5, S6). The new regressions pass, and all four tests that cover them fail when run against the previous source.

I've made all three changes (F1, S5, S6). The new regressions pass, and all four tests that cover them fail when run against the previous source.

**F1: Claude Compose root**
- `packages/core/src/diagnostics/providerRoots.ts` now has its own Claude case. When an agent uses the default `~/.claude` (including no config path, or a trailing slash), it uses `CLAUDE_CONFIG_PATH`, then `HOST_CLAUDE_DIR`, before falling back to `HOME`. The value still has to be an absolute path, or it is refused as `relative-root`.
- Managed, custom `~/…` and absolute Claude paths keep their own meaning and are not replaced by the shared variable. This is the same rule Codex uses.
- The daemon inventory (`src/daemon/managedDiagnostics.ts`) goes through the same resolver, so it is fixed too without any change of its own.
- New tests:
  - The resolver test from the review: `HOME=/root`, containerized, `CLAUDE_CONFIG_PATH` set, default `~/.claude` resolves to the mounted directory. It also covers the `HOST_CLAUDE_DIR` fallback, managed/custom/absolute paths, and a relative mapping being refused.
  - A Compose-style end-to-end check: the worker `HOME` has no `.claude`, only `CLAUDE_CONFIG_PATH` points to a real directory. Capture succeeds, the stored credential is redacted from output, and `providerCredentialRoot` returns the mounted directory.
- I updated the Claude row in the doc table in `docs/operations/managed-diagnostics.md`.

**S5: frames after a rejected head**
- In `captureProviderOutput`, a line that would open a stack-trace window is now checked first with `redactRecord` and the same size limit the spool uses. If that check would reject it, no window opens, so the frames after it are dropped as gaps instead of being exported without their head. This works whether the frames arrive in the same write or a later one.
- The capture test now covers both cases (control-character heads), and I added one sentence about this to the doc's Continuations paragraph.

**S6: `user:@host`**
- `urlUserinfo` no longer skips `user` when the password is empty.
- The post-policy env test now includes `-e UPSTREAM=http://opaque-userinfo-canary:@proxy:8080`, and checks the username doesn't appear in the export.

**Verification:** the diagnostics, coverage, portability, network-egress, daemon and OpenCode agent suites all pass when run on their own (31, 10, 6, 13, 17, 10 and 41 tests). Running all seven in parallel through `scripts/run-test-suite.mjs`, one test failed: "concurrent process rotation, export and cursor CAS…" in `managedDiagnostics.test.ts`. That file passes 31/31 on its own, so it looks like load from the parallel run rather than these changes. Typecheck is clean for the root and `packages/core`. ESLint finds no errors in the two changed source files; it skips the test file because no ESLint config covers it.

**Found separately (not changed):** the current Claude launcher (`dockerArgsBuilder.ts:218`) mounts `resolveConfigPath(config.configPath)`, and for `~/.claude` that does not check `CLAUDE_CONFIG_PATH`. Only the older `claudeService` path and `agentLoginDocker` use that variable. So in Compose the diagnostics root now follows the documented mapping, but the launcher's own mount for a default-path agent may still expand against the worker's `HOME`. That problem was already there before this PR and needs a separate decision.

No visual previews, since nothing here changes what a user sees.

PR: #3031
Comment by: @integry (ID: 6133743024)
Model: Claude Opus 5.5

* feat(ai): I split `resolveProviderCredentialRoot` into small provider-specific helpers, without disabling or suppressing the rule. It now passes the core lint that failed CI, at zero warnings.

I split `resolveProviderCredentialRoot` into small provider-specific helpers, without disabling or suppressing the rule. It now passes the core lint that failed CI, at zero warnings.

**What changed** (all in `packages/core/src/diagnostics/providerRoots.ts`):
- `resolveProviderCredentialRoot` now only does the dispatch:
  - it checks whether the launcher supplied a mount source.
  - it refuses unknown providers.
  - it builds a small `RootContext` (env, config path, path resolver).
  - it calls the matching provider resolver inside the same `try`/`catch`, so any resolver that throws still returns `unmapped-default-root`.
- New helpers:
  - `launchRoot`: the authoritative `authenticationRoot` / Vibe `nativeRoot` paths.
  - `defaultResolver`: the Codex path resolver vs the general one.
  - A `configuredRootResolvers` lookup table for antigravity, claude, vibe and opencode, with `defaultConfiguredRoot` for codex.
  - `claudeRoot`: the F1 Compose mapping, unchanged. With the default `~/.claude` config, `CLAUDE_CONFIG_PATH` or `HOST_CLAUDE_DIR` is used and the worker's own HOME is never expanded.
  - `openCodeRoot`: the `HOST_OPENCODE_DATA_DIR`, `XDG_DATA_HOME` and data-directory-next-to-config rules, unchanged.
- Each helper's logic is moved over as it was. Every result still goes through `absolute()`, so the relative-path, null-byte and filesystem-root refusals still apply.

**Verification:**
- **Lint:** I ran `eslint --max-warnings 0` on every `packages/core/src` file this branch adds or modifies, which is what CI runs, and it is clean. A whole-package `npm run lint` still shows two warnings, in `dockerResultProcessor.ts` and `usageTrackingWrapper.ts`. This branch doesn't touch those files and CI doesn't lint them.
- **Typecheck:** `tsc --noEmit` is clean for `packages/core` and for the root.
- **Diagnostics tests:** the three `managedDiagnostics*` suites pass, 54 tests in total. `managedDiagnosticsCoverage.test.ts` already covers the Claude Compose mapping and every refusal reason (`relative-root`, `unmapped-default-root`, `no-mounted-auth-store`, `unsupported-provider`), so I didn't add tests.
- **Other suites using the resolver:** `test/daemon.test.ts` and `test/opencodeAgent.test.ts` pass under the project's suite runner (`scripts/run-test-suite.mjs`) after a core rebuild, with `PROPR_DEMO_MODE=true`. Without that setting, `daemon.test.ts` fails because GitHub auth isn't configured in this environment.

There's nothing visual to preview.

PR: #3031
Comment by: @propr-dev[bot] (ID: 6133963582)
Comment by: @github-actions[bot] (ID: 6133964246)
Comment by: @integry (ID: 6133997253)
Model: Claude Opus 5.5

---------

Co-authored-by: propr-dev[bot] <1316198+propr-dev[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants