-
-
Notifications
You must be signed in to change notification settings - Fork 88
RG-T55 RMS First pass #494
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
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| namespace Resgrid.Config | ||
| { | ||
| /// <summary> | ||
| /// Malware scanning for Records attachments (RMS plan section 4.7) through a clamd daemon. Off by default: | ||
| /// with scanning disabled every attachment is stored as Skipped, exactly as with no scanner registered. | ||
| /// Environment keys: RESGRID:AttachmentScanningConfig:Enabled, :Host, :Port, :TimeoutSeconds, :FailClosed. | ||
| /// </summary> | ||
| public static class AttachmentScanningConfig | ||
| { | ||
| /// <summary>Master switch. When false the scanner never opens a connection.</summary> | ||
| public static bool Enabled = false; | ||
|
|
||
| /// <summary>clamd host (the ClamAV service name inside the compose/k8s network).</summary> | ||
| public static string Host = "clamav"; | ||
|
|
||
| /// <summary>clamd TCP port.</summary> | ||
| public static int Port = 3310; | ||
|
|
||
| /// <summary>Connect, stream and reply budget for one scan.</summary> | ||
| public static int TimeoutSeconds = 30; | ||
|
|
||
| /// <summary>INSTREAM chunk size in bytes.</summary> | ||
| public static int ChunkSize = 64 * 1024; | ||
|
|
||
| /// <summary> | ||
| /// What an unreachable or erroring engine means for the upload: true rejects the attachment (the safe | ||
| /// default for a records system), false stores it as Pending with the reason on the row. | ||
| /// </summary> | ||
| public static bool FailClosed = true; | ||
| } | ||
| } | ||
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,28 @@ | ||
| namespace Resgrid.Config | ||
| { | ||
| /// <summary> | ||
| /// Shared Lucene.NET search host (Unified Search plan section 9.2, absorbed by RMS-1). Off by default: with the | ||
| /// host disabled the Records queue keeps running on the indexed projection table and free-text search is | ||
| /// reported as unavailable rather than silently degrading to LIKE. | ||
| /// </summary> | ||
| public static class SearchConfig | ||
| { | ||
| /// <summary>Master switch for the search host in every process.</summary> | ||
| public static bool Enabled = false; | ||
|
|
||
| /// <summary>Root directory shared by the API/Web reader and the worker writer (Docker volume).</summary> | ||
| public static string IndexPath = "/data/search"; | ||
|
|
||
| /// <summary>Hard limit on hits a single query may return.</summary> | ||
| public static int MaxResults = 200; | ||
|
|
||
| /// <summary>IndexWriter RAM buffer before a flush.</summary> | ||
| public static int RamBufferSizeMb = 16; | ||
|
|
||
| /// <summary>Rows fetched per page while rebuilding or catching up a department.</summary> | ||
| public static int IndexBatchSize = 500; | ||
|
|
||
| /// <summary>Maximum departments one maintenance sweep rebuilds before yielding to the next run.</summary> | ||
| public static int MaxRebuildsPerSweep = 5; | ||
| } | ||
| } |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mutable configuration state in Core/Resgrid.Config/AttachmentScanningConfig.cs because public static bool Enabled = false; declares immutable metadata as a writable field. Mark it const, as shown, or readonly if runtime assignment is required.
Kody rule violation: Use `readonly` or `const` for Immutable Data
Prompt for LLM
Talk to Kody by mentioning @kody
Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.