nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: oasisprotocol/oasis-sdk
Pull request #344 (2021-08-05 18:14:36)

ci: enable npm packages cache 
to follow #342

looks like they've added support for exotic repo layouts like ours


Patch:
diff --git a/.github/workflows/ci-lint.yml b/.github/workflows/ci-lint.yml
index 7ff42729b1..ef209d0217 100644
--- a/.github/workflows/ci-lint.yml
+++ b/.github/workflows/ci-lint.yml
@@ -83,9 +83,11 @@ jobs:
         uses: actions/checkout@v2
 
       - name: Set up Node.js LTS
-        uses: actions/setup-node@v2.3.0
+        uses: actions/setup-node@v2.4.0
         with:
           node-version: "14.x"
+          cache: npm
+          cache-dependency-path: 'client-sdk/ts-web/package-lock.json'
 
       - name: Set up npm
         run: npm install npm@7 -g


Test patch:
diff --git a/.github/workflows/ci-test.yaml b/.github/workflows/ci-test.yaml
index 10e496ced9..9632d9ad50 100644
--- a/.github/workflows/ci-test.yaml
+++ b/.github/workflows/ci-test.yaml
@@ -99,9 +99,11 @@ jobs:
         uses: actions/checkout@v2
 
       - name: Set up Node.js LTS
-        uses: actions/setup-node@v2.3.0
+        uses: actions/setup-node@v2.4.0
         with:
           node-version: "14.x"
+          cache: npm
+          cache-dependency-path: 'client-sdk/ts-web/package-lock.json'
 
       - name: Set up npm
         run: npm install npm@7 -g
@@ -139,9 +141,11 @@ jobs:
         uses: actions/checkout@v2
 
       - name: Set up Node.js LTS
-        uses: actions/setup-node@v2.3.0
+        uses: actions/setup-node@v2.4.0
         with:
           node-version: "14.x"
+          cache: npm
+          cache-dependency-path: 'client-sdk/ts-web/package-lock.json'
 
       - name: Set up npm
         run: npm install npm@7 -g
@@ -200,9 +204,11 @@ jobs:
         uses: actions/checkout@v2
 
       - name: Set up Node.js LTS
-        uses: actions/setup-node@v2.3.0
+        uses: actions/setup-node@v2.4.0
         with:
           node-version: "14.x"
+          cache: npm
+          cache-dependency-path: 'client-sdk/ts-web/package-lock.json'
 
       - name: Set up npm
         run: npm install npm@7 -g
@@ -239,9 +245,11 @@ jobs:
         uses: actions/checkout@v2
 
       - name: Set up Node.js LTS
-        uses: actions/setup-node@v2.3.0
+        uses: actions/setup-node@v2.4.0
         with:
           node-version: "14.x"
+          cache: npm
+          cache-dependency-path: 'client-sdk/ts-web/package-lock.json'
 
       - name: Set up npm
         run: npm install npm@7 -g
@@ -344,9 +352,11 @@ jobs:
         uses: actions/checkout@v2
 
       - name: Set up Node.js LTS
-        uses: actions/setup-node@v2.3.0
+        uses: actions/setup-node@v2.4.0
         with:
           node-version: "14.x"
+          cache: npm
+          cache-dependency-path: 'client-sdk/ts-web/package-lock.json'
 
       - name: Set up npm
         run: npm install npm@7 -g
Repository: oasisprotocol/oasis-sdk
Pull request #144 (2021-05-19 23:56:22)

runtime-sdk: actually call the approve_unverified_tx step
those default implementations are silent but deadly :facepalm: 


Patch:
diff --git a/runtime-sdk/src/module.rs b/runtime-sdk/src/module.rs
index ffb6550846..ef1b14e036 100644
--- a/runtime-sdk/src/module.rs
+++ b/runtime-sdk/src/module.rs
@@ -168,6 +168,14 @@ pub trait AuthHandler {
 
 #[impl_for_tuples(30)]
 impl AuthHandler for Tuple {
+    fn approve_unverified_tx(
+        ctx: &mut DispatchContext<'_>,
+        utx: &UnverifiedTransaction,
+    ) -> Result<(), modules::core::Error> {
+        for_tuples!( #( Tuple::approve_unverified_tx(ctx, utx)?; )* );
+        Ok(())
+    }
+
     fn authenticate_tx(
         ctx: &mut DispatchContext<'_>,
         tx: &Transaction,


Test patch:
diff --git a/tests/runtimes/simple-keyvalue/src/lib.rs b/tests/runtimes/simple-keyvalue/src/lib.rs
index b890c7ddbe..b318b411ef 100644
--- a/tests/runtimes/simple-keyvalue/src/lib.rs
+++ b/tests/runtimes/simple-keyvalue/src/lib.rs
@@ -8,6 +8,8 @@ use oasis_runtime_sdk::{
 };
 
 pub mod keyvalue;
+#[cfg(test)]
+mod test;
 
 /// Simple keyvalue runtime.
 pub struct Runtime;
diff --git a/tests/runtimes/simple-keyvalue/src/test.rs b/tests/runtimes/simple-keyvalue/src/test.rs
new file mode 100644
index 0000000000..d878dbe8a9
--- /dev/null
+++ b/tests/runtimes/simple-keyvalue/src/test.rs
@@ -0,0 +1,33 @@
+use oasis_runtime_sdk::{
+    module::AuthHandler as _,
+    modules::{core, core::Module as Core},
+    testing::mock,
+    types::transaction,
+    Context as _, Module as _,
+};
+
+#[test]
+fn test_impl_for_tuple() {
+    let mut mock = mock::Mock::default();
+    let mut ctx = mock.create_ctx();
+    Core::set_params(
+        ctx.runtime_state(),
+        &core::Parameters {
+            max_batch_gas: u64::MAX,
+            max_tx_signers: 1,
+            max_multisig_signers: 1,
+        },
+    );
+    let dummy_bytes = b"you look, you die".to_vec();
+    <super::Runtime as oasis_runtime_sdk::Runtime>::Modules::approve_unverified_tx(
+        &mut ctx,
+        &transaction::UnverifiedTransaction(
+            dummy_bytes.clone(),
+            vec![
+                transaction::AuthProof::Signature(dummy_bytes.clone().into()),
+                transaction::AuthProof::Signature(dummy_bytes.clone().into()),
+            ],
+        ),
+    )
+    .expect_err("too many authentication slots");
+}