Skip to content

Post-review follow-up#246

Merged
ernest-nowacki merged 8 commits into
mainfrom
fix/post-review-fixes
May 27, 2026
Merged

Post-review follow-up#246
ernest-nowacki merged 8 commits into
mainfrom
fix/post-review-fixes

Conversation

@ernest-nowacki
Copy link
Copy Markdown
Collaborator

  • HTTP: new getHeaders() for multi-value headers; getHeader() now reads multiHeaders and supports ConfidentialHTTPResponse.
  • Secrets: default namespace to "default".
  • Numeric guards: Int64/UInt64/bigintToProtoBigInt reject unsafe-integer number inputs.

@ernest-nowacki ernest-nowacki marked this pull request as ready for review May 21, 2026 15:52
@ernest-nowacki ernest-nowacki requested review from a team as code owners May 21, 2026 15:52
Copy link
Copy Markdown
Collaborator

@russell-stern russell-stern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, the default namespace should be updated though


static CURRENT_MODE: Mutex<i32> = Mutex::new(0);
static RANDOM_GENERATORS: OnceLock<Mutex<HashMap<i32, ChaCha8Rng>>> = OnceLock::new();
const MAX_RESPONSE_LEN_BYTES: i32 = 64 * 1024 * 1024;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this constant coming from?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think GO have anything like this. That's my proposal for max response length (roughly 64 MB) which I think should not even be reached in realistic scenarios. It's basically just to have any upper bound limit.

runtime
}

#[cfg(test)]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do the tests need to be in the same file?

import { CapabilityError } from '@cre/sdk/utils/capabilities/capability-error'
import { DonModeError, NodeModeError, SecretsError } from '../errors'

const DEFAULT_SECRET_NAMESPACE = 'default'
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default namespace for vault is 'main' not 'default'. We should probably have a centralized place that says it but currently it lives in chainlink

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing it in the const for now, happy to follow up once we agreed on the right centralized place to keep it.

* @param response - The Response object
* @param name - The header name (case-insensitive)
* @returns The header value or undefined if not found
* Returns all values for a header (case-insensitive).
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Elsewhere in this file we use the @param & @returns style comments, we should keep the comment formatting the same here

@ernest-nowacki ernest-nowacki enabled auto-merge (squash) May 27, 2026 15:27
@ernest-nowacki ernest-nowacki merged commit bd1d962 into main May 27, 2026
12 checks passed
@ernest-nowacki ernest-nowacki deleted the fix/post-review-fixes branch May 27, 2026 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants